Fix proc_net_test_native for native tests.

"DefaultValueEqZero" is only valid if the test is in a
sandbox. Our CI VMs often have "/proc/sys/net/ipv4/ip_forward" set
to 1.

PiperOrigin-RevId: 332910859
This commit is contained in:
Zach Koopmans
2020-09-21 12:46:21 -07:00
committed by gVisor bot
parent d72022373f
commit a129204cf5
+3
View File
@@ -522,6 +522,9 @@ TEST(ProcSysNetIpv4IpForward, Exists) {
}
TEST(ProcSysNetIpv4IpForward, DefaultValueEqZero) {
// Test is only valid in sandbox. Not hermetic in native tests
// running on a arbitrary machine.
SKIP_IF(!IsRunningOnGvisor());
auto const fd = ASSERT_NO_ERRNO_AND_VALUE(Open(kIpForward, O_RDONLY));
char buf = 101;