mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
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:
committed by
gVisor bot
parent
b3141b680f
commit
4141dc0d2c
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user