mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
Use infinite poll timeout on Fuchsia
Use infinite timeout when polling on the connecting/connected socket after the listening socket is closed/shutdown on Fuchsia, as this particular poll has been observed to be very flaky in Fuchsia Infra. PiperOrigin-RevId: 546006387
This commit is contained in:
@@ -669,7 +669,10 @@ void TestListenHangupConnectingRead(const SocketInetTestParam& param,
|
||||
.fd = fd,
|
||||
};
|
||||
// When the listening socket is closed, the peer would reset the connection.
|
||||
EXPECT_THAT(poll(&pfd, 1, kTimeout), SyscallSucceedsWithValue(1));
|
||||
// NB: poll indefinitely on Fuchsia to avoid timing out in Infra.
|
||||
EXPECT_THAT(
|
||||
poll(&pfd, 1, GvisorPlatform() == Platform::kFuchsia ? -1 : kTimeout),
|
||||
SyscallSucceedsWithValue(1));
|
||||
EXPECT_EQ(pfd.revents, POLLHUP | POLLERR);
|
||||
char c;
|
||||
EXPECT_THAT(read(fd, &c, sizeof(c)), SyscallFailsWithErrno(expected_errno));
|
||||
|
||||
Reference in New Issue
Block a user