From 301bd57b1d5ce78fe3e26f68c8f8f797abfbb5ca Mon Sep 17 00:00:00 2001 From: Doug Davis Date: Fri, 20 Mar 2015 05:36:34 -0700 Subject: [PATCH] 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 --- integration-cli/docker_cli_run_unix_test.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/integration-cli/docker_cli_run_unix_test.go b/integration-cli/docker_cli_run_unix_test.go index e328b74848..6fe416f9d2 100644 --- a/integration-cli/docker_cli_run_unix_test.go +++ b/integration-cli/docker_cli_run_unix_test.go @@ -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)