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:
parent
385d4beaa5
commit
301bd57b1d
1 changed files with 4 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue