Ignore blank lines in getCgroupPaths
w/o this I would see: ``` unexpected file format for /proc/self/cgroup - "" ``` while running the cgroup tests Signed-off-by: Doug Davis <dug@us.ibm.com> Upstream-commit: 301bd57b1d5ce78fe3e26f68c8f8f797abfbb5ca Component: engine
This commit is contained in:
@ -112,6 +112,10 @@ func TestRunWithUlimits(t *testing.T) {
|
||||
func getCgroupPaths(test string) map[string]string {
|
||||
cgroupPaths := map[string]string{}
|
||||
for _, line := range strings.Split(test, "\n") {
|
||||
line = strings.TrimSpace(line)
|
||||
if line == "" {
|
||||
continue
|
||||
}
|
||||
parts := strings.Split(line, ":")
|
||||
if len(parts) != 3 {
|
||||
fmt.Printf("unexpected file format for /proc/self/cgroup - %q\n", line)
|
||||
|
||||
Reference in New Issue
Block a user