mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
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:
committed by
gVisor bot
parent
d72022373f
commit
a129204cf5
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user