diff options
author | Ian Gudger <igudger@google.com> | 2020-06-17 15:14:17 -0700 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-06-17 15:15:57 -0700 |
commit | 02072fd243a1e88b635dd6a24dd512608fbfce5f (patch) | |
tree | 39529b17ad3785efeb49ef7f4444005f44bd391a /test/syscalls/linux/proc_net.cc | |
parent | a5f4deeca76b83745c0bae5c2b300faf5776b640 (diff) |
Add test for stat("/proc/net/snmp").
PiperOrigin-RevId: 316974863
Diffstat (limited to 'test/syscalls/linux/proc_net.cc')
-rw-r--r-- | test/syscalls/linux/proc_net.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/syscalls/linux/proc_net.cc b/test/syscalls/linux/proc_net.cc index 02a326fc3..3377b65cf 100644 --- a/test/syscalls/linux/proc_net.cc +++ b/test/syscalls/linux/proc_net.cc @@ -441,6 +441,11 @@ TEST(ProcNetSnmp, CheckNetStat) { EXPECT_EQ(value_count, 4); } +TEST(ProcNetSnmp, Stat) { + struct stat st = {}; + ASSERT_THAT(stat("/proc/net/snmp", &st), SyscallSucceeds()); +} + TEST(ProcNetSnmp, CheckSnmp) { // TODO(b/155123175): SNMP and netstat don't work on gVisor. SKIP_IF(IsRunningOnGvisor()); |