Add test for stat("/proc/net/snmp").

PiperOrigin-RevId: 316974863
This commit is contained in:
Ian Gudger
2020-06-17 15:15:57 -07:00
committed by gVisor bot
parent a5f4deeca7
commit 02072fd243
+5
View File
@@ -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());