summaryrefslogtreecommitdiffhomepage
path: root/test/runner
diff options
context:
space:
mode:
authorJamie Liu <jamieliu@google.com>2020-05-21 14:01:26 -0700
committergVisor bot <gvisor-bot@google.com>2020-05-21 14:02:43 -0700
commit198642df7689852062be9e3847a98e02d1bcbfd9 (patch)
tree5ba937e88ea1e3b5f6f82d2a8803294b7ff3b550 /test/runner
parentcdf48e851670f8f333f61e7621e0aa7d495d98fe (diff)
Fix IsRunningWithVFS1() on the runsc-based test runner.
Updates #1035 PiperOrigin-RevId: 312736450
Diffstat (limited to 'test/runner')
-rw-r--r--test/runner/runner.go8
1 files changed, 5 insertions, 3 deletions
diff --git a/test/runner/runner.go b/test/runner/runner.go
index 14c9cbc47..e4f04cd2a 100644
--- a/test/runner/runner.go
+++ b/test/runner/runner.go
@@ -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