summaryrefslogtreecommitdiffhomepage
path: root/test/runner
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2020-07-15 12:14:42 -0700
committergVisor bot <gvisor-bot@google.com>2020-07-15 12:14:42 -0700
commit8939fae0af9dc8e1cdf2553339fee35b684fc828 (patch)
tree95224138ca159fd3c6b9d32eaf6c1930c1dfd6ff /test/runner
parentfc48ace73aea9294c9f4ee881950d836715bf4d7 (diff)
parentabffebde7be2dcdb4564e45f845d7c150ced0ccb (diff)
Merge pull request #3165 from ridwanmsharif:ridwanmsharif/fuse-off-by-default
PiperOrigin-RevId: 321411758
Diffstat (limited to 'test/runner')
-rw-r--r--test/runner/defs.bzl20
-rw-r--r--test/runner/runner.go10
2 files changed, 29 insertions, 1 deletions
diff --git a/test/runner/defs.bzl b/test/runner/defs.bzl
index 921e499be..600cb5192 100644
--- a/test/runner/defs.bzl
+++ b/test/runner/defs.bzl
@@ -61,7 +61,8 @@ def _syscall_test(
file_access = "exclusive",
overlay = False,
add_uds_tree = False,
- vfs2 = False):
+ vfs2 = False,
+ fuse = False):
# Prepend "runsc" to non-native platform names.
full_platform = platform if platform == "native" else "runsc_" + platform
@@ -73,6 +74,8 @@ def _syscall_test(
name += "_overlay"
if vfs2:
name += "_vfs2"
+ if fuse:
+ name += "_fuse"
if network != "none":
name += "_" + network + "net"
@@ -107,6 +110,7 @@ def _syscall_test(
"--overlay=" + str(overlay),
"--add-uds-tree=" + str(add_uds_tree),
"--vfs2=" + str(vfs2),
+ "--fuse=" + str(fuse),
]
# Call the rule above.
@@ -129,6 +133,7 @@ def syscall_test(
add_uds_tree = False,
add_hostinet = False,
vfs2 = False,
+ fuse = False,
tags = None):
"""syscall_test is a macro that will create targets for all platforms.
@@ -188,6 +193,19 @@ def syscall_test(
vfs2 = True,
)
+ if vfs2 and fuse:
+ _syscall_test(
+ test = test,
+ shard_count = shard_count,
+ size = size,
+ platform = default_platform,
+ use_tmpfs = use_tmpfs,
+ add_uds_tree = add_uds_tree,
+ tags = platforms[default_platform] + vfs2_tags,
+ vfs2 = True,
+ fuse = True,
+ )
+
# TODO(gvisor.dev/issue/1487): Enable VFS2 overlay tests.
if add_overlay:
_syscall_test(
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")
}