From 02072fd243a1e88b635dd6a24dd512608fbfce5f Mon Sep 17 00:00:00 2001 From: Ian Gudger Date: Wed, 17 Jun 2020 15:14:17 -0700 Subject: Add test for stat("/proc/net/snmp"). PiperOrigin-RevId: 316974863 --- test/syscalls/linux/proc_net.cc | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'test/syscalls') 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()); -- cgit v1.2.3