diff options
Diffstat (limited to 'extras/hs-test/infra/container.go')
-rw-r--r-- | extras/hs-test/infra/container.go | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/extras/hs-test/infra/container.go b/extras/hs-test/infra/container.go index 8ec9b8cd02c..019eec40f78 100644 --- a/extras/hs-test/infra/container.go +++ b/extras/hs-test/infra/container.go @@ -329,9 +329,13 @@ func (c *Container) getVolumesAsSlice() []string { core_pattern, err := sysctl.Read("kernel.core_pattern") if err == nil { - index := strings.LastIndex(core_pattern, "/") - core_pattern = core_pattern[:index] - volumeSlice = append(volumeSlice, c.Suite.getLogDirPath()+":"+core_pattern) + if len(core_pattern) > 0 && core_pattern[0] != '|' { + index := strings.LastIndex(core_pattern, "/") + core_pattern = core_pattern[:index] + volumeSlice = append(volumeSlice, c.Suite.getLogDirPath()+":"+core_pattern) + } else { + c.Suite.Log(fmt.Sprintf("core_pattern \"%s\" starts with pipe, ignoring", core_pattern)) + } } else { c.Suite.Log(err) } |