mirror of
https://github.com/opencontainers/runc.git
synced 2026-04-22 23:17:17 +08:00
Fix default cgroup path
Alternative of #895 , part of #892 The intension of current behavior if to create cgroup in parent cgroup of current process, but we did this in a wrong way, we used devices cgroup path of current process as the default parent path for all subsystems, this is wrong because we don't always have the same cgroup path for all subsystems. Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
This commit is contained in:
@@ -3,7 +3,6 @@
|
||||
package specconv
|
||||
|
||||
import (
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/opencontainers/runtime-spec/specs-go"
|
||||
@@ -33,7 +32,7 @@ func TestLinuxCgroupsPathNotSpecified(t *testing.T) {
|
||||
t.Errorf("Couldn't create Cgroup config: %v", err)
|
||||
}
|
||||
|
||||
if !strings.HasSuffix(cgroup.Path, "/ContainerID") {
|
||||
t.Errorf("Wrong cgroupsPath, expected it to have suffix '%s' got '%s'", "/ContainerID", cgroup.Path)
|
||||
if cgroup.Path != "" {
|
||||
t.Errorf("Wrong cgroupsPath, expected it to be empty string, got '%s'", cgroup.Path)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user