From cc995207531965b70bc1b812a70b91f242a92086 Mon Sep 17 00:00:00 2001 From: Fabricio Voznika Date: Thu, 24 Jan 2019 22:41:28 -0800 Subject: [PATCH] Add runsc logs to test results PiperOrigin-RevId: 230850177 Change-Id: I34eb24e8ff8dd9ce3e7f5eb2dc2ee58eeac49f07 --- test/syscalls/syscall_test_runner.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/syscalls/syscall_test_runner.go b/test/syscalls/syscall_test_runner.go index e8593ec73..e1fba637c 100644 --- a/test/syscalls/syscall_test_runner.go +++ b/test/syscalls/syscall_test_runner.go @@ -168,6 +168,10 @@ func runTestCaseRunsc(testBin string, tc gtest.TestCase, t *testing.T) { if *strace { args = append(args, "-strace") } + if outDir, ok := syscall.Getenv("TEST_UNDECLARED_OUTPUTS_DIR"); ok { + args = append(args, "-debug-log", outDir+"/") + } + // Current process doesn't have CAP_SYS_ADMIN, create user namespace and run // as root inside that namespace to get it. args = append(args, "run", "--bundle", bundleDir, id)