diff options
-rwxr-xr-x | test/apiv2/test-apiv2 | 2 | ||||
-rw-r--r-- | utils/utils_supported.go | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/test/apiv2/test-apiv2 b/test/apiv2/test-apiv2 index 7a3518df2..d0bf28b9a 100755 --- a/test/apiv2/test-apiv2 +++ b/test/apiv2/test-apiv2 @@ -84,7 +84,7 @@ function like() { if expr "$actual" : "$expect" &>/dev/null; then # On success, include expected value; this helps readers understand - _show_ok 1 "$testname~$expect" + _show_ok 1 "$testname ('$actual') ~ $expect" return fi _show_ok 0 "$testname" "~ $expect" "$actual" diff --git a/utils/utils_supported.go b/utils/utils_supported.go index 201ddb57b..4258e6d7a 100644 --- a/utils/utils_supported.go +++ b/utils/utils_supported.go @@ -64,7 +64,7 @@ func getCgroupProcess(procFile string) (string, error) { cgroup := "/" for scanner.Scan() { line := scanner.Text() - parts := strings.Split(line, ":") + parts := strings.SplitN(line, ":", 3) if len(parts) != 3 { return "", errors.Errorf("cannot parse cgroup line %q", line) } @@ -116,7 +116,7 @@ func MoveUnderCgroupSubtree(subtree string) error { scanner := bufio.NewScanner(f) for scanner.Scan() { line := scanner.Text() - parts := strings.Split(line, ":") + parts := strings.SplitN(line, ":", 3) if len(parts) != 3 { return errors.Errorf("cannot parse cgroup line %q", line) } |