From cc1f80913f72a39214315f2d13f76295a5a324d8 Mon Sep 17 00:00:00 2001 From: Nick Brown Date: Wed, 15 Mar 2023 10:25:33 -0700 Subject: [PATCH] Defer poll timeout to Fuchsia's CI infra Set the ICMP poll timeout to a negative value so the poll will block indefinitely. This effectively delegates the timeout to the overall test timeout imposed by Fuchsia's CI/CQ. PiperOrigin-RevId: 516863038 --- test/syscalls/linux/udp_socket.cc | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/test/syscalls/linux/udp_socket.cc b/test/syscalls/linux/udp_socket.cc index da8dafe53..345301049 100644 --- a/test/syscalls/linux/udp_socket.cc +++ b/test/syscalls/linux/udp_socket.cc @@ -53,10 +53,11 @@ namespace testing { namespace { -size_t IcmpTimeoutMillis() { - // Fuchsia's CI infra is susceptible to timing jumps. Set a long timeout - // to avoid flakes. - return GvisorPlatform() == Platform::kFuchsia ? 100000 : 1000; +int IcmpTimeoutMillis() { + // Fuchsia's CI infra is susceptible to timing jumps. Set a negative timeout + // so that poll will block indefinitely, which effectively delegates the + // timeout to infra. + return GvisorPlatform() == Platform::kFuchsia ? -1 : 1000; } // Fixture for tests parameterized by the address family to use (AF_INET and