summaryrefslogtreecommitdiffhomepage
path: root/test/syscalls
diff options
context:
space:
mode:
authorIan Gudger <igudger@google.com>2020-06-17 15:14:17 -0700
committergVisor bot <gvisor-bot@google.com>2020-06-17 15:15:57 -0700
commit02072fd243a1e88b635dd6a24dd512608fbfce5f (patch)
tree39529b17ad3785efeb49ef7f4444005f44bd391a /test/syscalls
parenta5f4deeca76b83745c0bae5c2b300faf5776b640 (diff)
Add test for stat("/proc/net/snmp").
PiperOrigin-RevId: 316974863
Diffstat (limited to 'test/syscalls')
-rw-r--r--test/syscalls/linux/proc_net.cc5
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());