From a129204cf508b170a62c93ed7148453f346b32e4 Mon Sep 17 00:00:00 2001 From: Zach Koopmans Date: Mon, 21 Sep 2020 12:44:26 -0700 Subject: 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 --- test/syscalls/linux/proc_net.cc | 3 +++ 1 file changed, 3 insertions(+) (limited to 'test/syscalls/linux') 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; -- cgit v1.2.3