summaryrefslogtreecommitdiffhomepage
path: root/test/runner/runner.go
diff options
context:
space:
mode:
authorRidwan Sharif <ridwanmsharif@google.com>2020-07-07 21:48:25 -0400
committerRidwan Sharif <ridwanmsharif@google.com>2020-07-09 02:01:29 -0400
commitabffebde7be2dcdb4564e45f845d7c150ced0ccb (patch)
tree4caa880aa8885596f597eaf5ab4eeeb5473da48e /test/runner/runner.go
parentc4815af9475cc4680c6d598d9c930de892c98aae (diff)
Gate FUSE behind a runsc flag
This change gates all FUSE commands (by gating /dev/fuse) behind a runsc flag. In order to use FUSE commands, use the --fuse flag with the --vfs2 flag. Check if FUSE is enabled by running dmesg in the sandbox.
Diffstat (limited to 'test/runner/runner.go')
-rw-r--r--test/runner/runner.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/runner/runner.go b/test/runner/runner.go
index 5456e46a6..2296f3a46 100644
--- a/test/runner/runner.go
+++ b/test/runner/runner.go
@@ -47,6 +47,7 @@ var (
fileAccess = flag.String("file-access", "exclusive", "mounts root in exclusive or shared mode")
overlay = flag.Bool("overlay", false, "wrap filesystem mounts with writable tmpfs overlay")
vfs2 = flag.Bool("vfs2", false, "enable VFS2")
+ fuse = flag.Bool("fuse", false, "enable FUSE")
parallel = flag.Bool("parallel", false, "run tests in parallel")
runscPath = flag.String("runsc", "", "path to runsc binary")
@@ -149,6 +150,9 @@ func runRunsc(tc gtest.TestCase, spec *specs.Spec) error {
}
if *vfs2 {
args = append(args, "-vfs2")
+ if *fuse {
+ args = append(args, "-fuse")
+ }
}
if *debug {
args = append(args, "-debug", "-log-packets=true")
@@ -358,6 +362,12 @@ func runTestCaseRunsc(testBin string, tc gtest.TestCase, t *testing.T) {
vfsVar := "GVISOR_VFS"
if *vfs2 {
env = append(env, vfsVar+"=VFS2")
+ fuseVar := "FUSE_ENABLED"
+ if *fuse {
+ env = append(env, fuseVar+"=TRUE")
+ } else {
+ env = append(env, fuseVar+"=FALSE")
+ }
} else {
env = append(env, vfsVar+"=VFS1")
}