Fix IsRunningWithVFS1() on the runsc-based test runner.

Updates #1035

PiperOrigin-RevId: 312736450
This commit is contained in:
Jamie Liu
2020-05-21 14:02:43 -07:00
committed by gVisor bot
parent cdf48e8516
commit 198642df76
+5 -3
View File
@@ -341,11 +341,13 @@ func runTestCaseRunsc(testBin string, tc gtest.TestCase, t *testing.T) {
}
}
// Set environment variables that indicate we are
// running in gVisor with the given platform and network.
// Set environment variables that indicate we are running in gVisor with
// the given platform, network, and filesystem stack.
// TODO(gvisor.dev/issue/1487): Update this when the runner supports VFS2.
platformVar := "TEST_ON_GVISOR"
networkVar := "GVISOR_NETWORK"
env := append(os.Environ(), platformVar+"="+*platform, networkVar+"="+*network)
vfsVar := "GVISOR_VFS"
env := append(os.Environ(), platformVar+"="+*platform, networkVar+"="+*network, vfsVar+"=VFS1")
// Remove env variables that cause the gunit binary to write output
// files, since they will stomp on eachother, and on the output files