Fix timeval for Socket test

tv_usec field should be a multiple of 4K to pass
in open source on linux/native, so make it one.

PiperOrigin-RevId: 327288405
This commit is contained in:
Zach Koopmans
2020-08-18 12:56:44 -07:00
committed by gVisor bot
parent b3141b680f
commit 4141dc0d2c
+1 -1
View File
@@ -463,7 +463,7 @@ TEST_P(AllSocketPairTest, SetGetSendTimeout) {
auto sockets = ASSERT_NO_ERRNO_AND_VALUE(NewSocketPair());
// tv_usec should be a multiple of 4000 to work on most systems.
timeval tv = {.tv_sec = 89, .tv_usec = 42000};
timeval tv = {.tv_sec = 89, .tv_usec = 44000};
EXPECT_THAT(
setsockopt(sockets->first_fd(), SOL_SOCKET, SO_SNDTIMEO, &tv, sizeof(tv)),
SyscallSucceeds());