summaryrefslogtreecommitdiffhomepage
path: root/test/syscalls/syscall_test_runner.go
diff options
context:
space:
mode:
Diffstat (limited to 'test/syscalls/syscall_test_runner.go')
-rw-r--r--test/syscalls/syscall_test_runner.go22
1 files changed, 15 insertions, 7 deletions
diff --git a/test/syscalls/syscall_test_runner.go b/test/syscalls/syscall_test_runner.go
index 9a8e0600b..5936d66ff 100644
--- a/test/syscalls/syscall_test_runner.go
+++ b/test/syscalls/syscall_test_runner.go
@@ -31,10 +31,10 @@ import (
specs "github.com/opencontainers/runtime-spec/specs-go"
"golang.org/x/sys/unix"
- "gvisor.googlesource.com/gvisor/pkg/log"
- "gvisor.googlesource.com/gvisor/runsc/specutils"
- "gvisor.googlesource.com/gvisor/runsc/test/testutil"
- "gvisor.googlesource.com/gvisor/test/syscalls/gtest"
+ "gvisor.dev/gvisor/pkg/log"
+ "gvisor.dev/gvisor/runsc/specutils"
+ "gvisor.dev/gvisor/runsc/test/testutil"
+ "gvisor.dev/gvisor/test/syscalls/gtest"
)
// Location of syscall tests, relative to the repo root.
@@ -47,6 +47,7 @@ var (
platform = flag.String("platform", "ptrace", "platform to run on")
useTmpfs = flag.Bool("use-tmpfs", false, "mounts tmpfs for /tmp")
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")
parallel = flag.Bool("parallel", false, "run tests in parallel")
runscPath = flag.String("runsc", "", "path to runsc binary")
)
@@ -184,10 +185,13 @@ func runTestCaseRunsc(testBin string, tc gtest.TestCase, t *testing.T) {
"-platform", *platform,
"-root", rootDir,
"-file-access", *fileAccess,
- "--network=none",
+ "-network=none",
"-log-format=text",
"-TESTONLY-unsafe-nonroot=true",
- "--net-raw=true",
+ "-net-raw=true",
+ }
+ if *overlay {
+ args = append(args, "-overlay")
}
if *debug {
args = append(args, "-debug", "-log-packets=true")
@@ -196,7 +200,11 @@ func runTestCaseRunsc(testBin string, tc gtest.TestCase, t *testing.T) {
args = append(args, "-strace")
}
if outDir, ok := syscall.Getenv("TEST_UNDECLARED_OUTPUTS_DIR"); ok {
- debugLogDir, err := ioutil.TempDir(outDir, "runsc")
+ tdir := filepath.Join(outDir, strings.Replace(tc.FullName(), "/", "_", -1))
+ if err := os.MkdirAll(tdir, 0755); err != nil {
+ t.Fatalf("could not create test dir: %v", err)
+ }
+ debugLogDir, err := ioutil.TempDir(tdir, "runsc")
if err != nil {
t.Fatalf("could not create temp dir: %v", err)
}