diff options
author | Rahat Mahmood <rahat@google.com> | 2019-08-02 12:51:23 -0700 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2019-08-02 12:52:40 -0700 |
commit | 2906dffcdbd4398361d5d7f718faa4f24fdc3b8e (patch) | |
tree | a4579e1fca9e9dec457329c7b4f4b96b8206bda3 /test/syscalls | |
parent | aaaefdf9cadf033fa281b612315c3227f5ab1c7a (diff) |
Automated rollback of changelist 261191548
PiperOrigin-RevId: 261373749
Diffstat (limited to 'test/syscalls')
-rw-r--r-- | test/syscalls/linux/socket_ip_tcp_generic.cc | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/test/syscalls/linux/socket_ip_tcp_generic.cc b/test/syscalls/linux/socket_ip_tcp_generic.cc index 01987d2f0..a43cf9bce 100644 --- a/test/syscalls/linux/socket_ip_tcp_generic.cc +++ b/test/syscalls/linux/socket_ip_tcp_generic.cc @@ -697,28 +697,5 @@ TEST_P(TCPSocketPairTest, SetCongestionControlFailsForUnsupported) { EXPECT_EQ(0, memcmp(got_cc, old_cc, sizeof(old_cc))); } -TEST_P(TCPSocketPairTest, GetSockOptTCPInfo) { - auto sockets = ASSERT_NO_ERRNO_AND_VALUE(NewSocketPair()); - struct tcp_info info; - socklen_t optlen = sizeof(info); - ASSERT_THAT( - getsockopt(sockets->first_fd(), SOL_TCP, TCP_INFO, &info, &optlen), - SyscallSucceedsWithValue(0)); - EXPECT_EQ(optlen, sizeof(info)); - - EXPECT_EQ(info.tcpi_state, TCP_ESTABLISHED); - - EXPECT_GT(info.tcpi_rto, 0); - - // IPv4 MSS is 536 bytes by default, and IPv6 is 1220 bytes. - EXPECT_GE(info.tcpi_snd_mss, 536); - EXPECT_GE(info.tcpi_rcv_mss, 536); - EXPECT_GE(info.tcpi_advmss, 536); - - // MTU is typically 1500 for ethernet, but this is highly protocol - // dependent. Opt for a safe lower bound. - EXPECT_GT(info.tcpi_pmtu, 500); -} - } // namespace testing } // namespace gvisor |