summaryrefslogtreecommitdiffhomepage
path: root/test/syscalls/linux/proc_net_tcp.cc
diff options
context:
space:
mode:
authorRahat Mahmood <rahat@google.com>2019-08-12 17:33:26 -0700
committergVisor bot <gvisor-bot@google.com>2019-08-12 17:34:38 -0700
commit691c2f8173dfe7349e8289697299839cda32b495 (patch)
tree0b9ac8bdddc1587f1c786f2554786d8f1a7bd880 /test/syscalls/linux/proc_net_tcp.cc
parenteac690e358e25897bb878fdfd1ad7036054162e2 (diff)
Compute size of struct tcp_info instead of hardcoding it.
PiperOrigin-RevId: 263040624
Diffstat (limited to 'test/syscalls/linux/proc_net_tcp.cc')
-rw-r--r--test/syscalls/linux/proc_net_tcp.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/syscalls/linux/proc_net_tcp.cc b/test/syscalls/linux/proc_net_tcp.cc
index 578b20680..2ca7b6ad7 100644
--- a/test/syscalls/linux/proc_net_tcp.cc
+++ b/test/syscalls/linux/proc_net_tcp.cc
@@ -187,9 +187,9 @@ TEST(ProcNetTCP, EntryUID) {
std::vector<TCPEntry> entries =
ASSERT_NO_ERRNO_AND_VALUE(ProcNetTCPEntries());
TCPEntry e;
- EXPECT_TRUE(FindByLocalAddr(entries, &e, sockets->first_addr()));
+ ASSERT_TRUE(FindByLocalAddr(entries, &e, sockets->first_addr()));
EXPECT_EQ(e.uid, geteuid());
- EXPECT_TRUE(FindByRemoteAddr(entries, &e, sockets->first_addr()));
+ ASSERT_TRUE(FindByRemoteAddr(entries, &e, sockets->first_addr()));
EXPECT_EQ(e.uid, geteuid());
}