Don't check that msg_flags contains MSG_ERRQUEUE on gvisor platforms.

PiperOrigin-RevId: 350246333
This commit is contained in:
Andrei Vagin 2021-01-05 16:46:00 -08:00 committed by gVisor bot
parent ce7a4440ca
commit b9b99d3d26
1 changed files with 6 additions and 1 deletions

View File

@ -835,7 +835,12 @@ TEST_P(UdpSocketTest, RecvErrorConnRefused) {
// Check the contents of msg.
EXPECT_EQ(memcmp(got, buf, sizeof(buf)), 0); // iovec check
EXPECT_NE(msg.msg_flags & MSG_ERRQUEUE, 0);
// TODO(b/176251997): The next check fails on the gvisor platform due to the
// kernel bug.
if (!IsRunningWithHostinet() || GvisorPlatform() == Platform::kPtrace ||
GvisorPlatform() == Platform::kKVM ||
GvisorPlatform() == Platform::kNative)
EXPECT_NE(msg.msg_flags & MSG_ERRQUEUE, 0);
EXPECT_EQ(memcmp(&remote, bind_addr_, addrlen_), 0);
// Check the contents of the control message.