summaryrefslogtreecommitdiffhomepage
path: root/runsc/sandbox
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2019-09-16 15:20:51 +0000
committergVisor bot <gvisor-bot@google.com>2019-09-16 15:20:51 +0000
commitbd22ab3b5ff5d75c1d47b3bd5d0f2709f2ccfe16 (patch)
tree00d092686fda06618fd28eda121d91edd46d7f0d /runsc/sandbox
parentc0e0b502737cb57e9b6bbd5a3fe665970360f9f8 (diff)
parent010b0932583711ab3f6a88b1136cf8d87c2a53d2 (diff)
Merge release-20190806.1-146-g010b093 (automated)
Diffstat (limited to 'runsc/sandbox')
-rw-r--r--runsc/sandbox/sandbox.go10
1 files changed, 9 insertions, 1 deletions
diff --git a/runsc/sandbox/sandbox.go b/runsc/sandbox/sandbox.go
index df3c0c5ef..4c6c83fbd 100644
--- a/runsc/sandbox/sandbox.go
+++ b/runsc/sandbox/sandbox.go
@@ -351,7 +351,15 @@ func (s *Sandbox) createSandboxProcess(conf *boot.Config, args *Args, startSyncF
nextFD++
}
if conf.DebugLog != "" {
- debugLogFile, err := specutils.DebugLogFile(conf.DebugLog, "boot")
+ test := ""
+ if len(conf.TestOnlyTestNameEnv) == 0 {
+ // Fetch test name if one is provided and the test only flag was set.
+ if t, ok := specutils.EnvVar(args.Spec.Process.Env, conf.TestOnlyTestNameEnv); ok {
+ test = t
+ }
+ }
+
+ debugLogFile, err := specutils.DebugLogFile(conf.DebugLog, "boot", test)
if err != nil {
return fmt.Errorf("opening debug log file in %q: %v", conf.DebugLog, err)
}