diff options
author | Zach Koopmans <zkoopmans@google.com> | 2020-09-21 12:44:26 -0700 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-09-21 12:46:21 -0700 |
commit | a129204cf508b170a62c93ed7148453f346b32e4 (patch) | |
tree | 0a8c4ae050c2c338e4609055a63d31e49a0c9633 /test/syscalls/linux | |
parent | d72022373f8ab2ca60ec1494858a3cb3e2be9040 (diff) |
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
Diffstat (limited to 'test/syscalls/linux')
-rw-r--r-- | test/syscalls/linux/proc_net.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/syscalls/linux/proc_net.cc b/test/syscalls/linux/proc_net.cc index 5f9378160..23677e296 100644 --- a/test/syscalls/linux/proc_net.cc +++ b/test/syscalls/linux/proc_net.cc @@ -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; |