Browse code

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>

Doug Davis authored on 2015/03/20 21:36:34
Showing 1 changed files
... ...
@@ -112,6 +112,10 @@ func TestRunWithUlimits(t *testing.T) {
112 112
 func getCgroupPaths(test string) map[string]string {
113 113
 	cgroupPaths := map[string]string{}
114 114
 	for _, line := range strings.Split(test, "\n") {
115
+		line = strings.TrimSpace(line)
116
+		if line == "" {
117
+			continue
118
+		}
115 119
 		parts := strings.Split(line, ":")
116 120
 		if len(parts) != 3 {
117 121
 			fmt.Printf("unexpected file format for /proc/self/cgroup - %q\n", line)