1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

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>
This commit is contained in:
Doug Davis 2015-03-20 05:36:34 -07:00
parent 385d4beaa5
commit 301bd57b1d

View file

@ -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)