mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
gvisor/tests: save runsc logs for each container in a separate directory
PiperOrigin-RevId: 232990964 Change-Id: Icfa426d5e83c7d3e56b0b92e6a9e1229bcb8361b
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user