summaryrefslogtreecommitdiffhomepage
path: root/test/syscalls
diff options
context:
space:
mode:
authorAndrei Vagin <avagin@google.com>2019-02-07 19:31:50 -0800
committerShentubot <shentubot@google.com>2019-02-07 19:32:51 -0800
commitfda4d1f4f11201c34bd15d41ba4c94279d135d95 (patch)
tree03eb983396e71ba8814061f4834c9a48f611cabb /test/syscalls
parent2ba74f84be8b9d3d588fb834414d151607799fd3 (diff)
gvisor/tests: save runsc logs for each container in a separate directory
PiperOrigin-RevId: 232990964 Change-Id: Icfa426d5e83c7d3e56b0b92e6a9e1229bcb8361b
Diffstat (limited to 'test/syscalls')
-rw-r--r--test/syscalls/syscall_test_runner.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/test/syscalls/syscall_test_runner.go b/test/syscalls/syscall_test_runner.go
index d3f61b75e..16228ef46 100644
--- a/test/syscalls/syscall_test_runner.go
+++ b/test/syscalls/syscall_test_runner.go
@@ -171,7 +171,13 @@ func runTestCaseRunsc(testBin string, tc gtest.TestCase, t *testing.T) {
args = append(args, "-strace")
}
if outDir, ok := syscall.Getenv("TEST_UNDECLARED_OUTPUTS_DIR"); ok {
- args = append(args, "-debug-log", outDir+"/")
+ debugLogDir, err := ioutil.TempDir(outDir, "runsc")
+ if err != nil {
+ t.Fatalf("could not create temp dir: %v", err)
+ }
+ debugLogDir += "/"
+ log.Infof("runsc logs: %s", debugLogDir)
+ args = append(args, "-debug-log", debugLogDir)
}
// Current process doesn't have CAP_SYS_ADMIN, create user namespace and run