diff options
author | Tamir Duberstein <tamird@google.com> | 2021-02-02 07:43:22 -0800 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2021-02-02 07:45:47 -0800 |
commit | 00d21b9ae0e379caba54720c71f200596100c8f0 (patch) | |
tree | 5447df172fd58a7afc9b28da7873d9ff2f92a52c /test/syscalls | |
parent | 5fa683ffdf0bbb86f4b97befb4b377821be8513d (diff) |
Assert TCP_INFO size before checking content
Also sync syscall test expectations on Fuchisa.
PiperOrigin-RevId: 355163492
Diffstat (limited to 'test/syscalls')
-rw-r--r-- | test/syscalls/linux/socket_ip_tcp_generic.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/test/syscalls/linux/socket_ip_tcp_generic.cc b/test/syscalls/linux/socket_ip_tcp_generic.cc index 2c8e5f6f3..579e824cd 100644 --- a/test/syscalls/linux/socket_ip_tcp_generic.cc +++ b/test/syscalls/linux/socket_ip_tcp_generic.cc @@ -88,6 +88,7 @@ TEST_P(TCPSocketPairTest, CheckTcpInfoFields) { socklen_t optLen = sizeof(opt); ASSERT_THAT(getsockopt(sockets->first_fd(), SOL_TCP, TCP_INFO, &opt, &optLen), SyscallSucceeds()); + ASSERT_EQ(optLen, sizeof(opt)); // Validates the received tcp_info fields. EXPECT_EQ(opt.tcpi_ca_state, TCP_CA_OPEN); |