From 3b992087b85bfe22d3f58358654c250a0487ae6d Mon Sep 17 00:00:00 2001 From: Boris Popovschi Date: Thu, 26 Dec 2019 12:13:22 +0200 Subject: [PATCH] Fix skip message for cgroupv2 Signed-off-by: Boris Popovschi --- libcontainer/cgroups/fs/apply_raw_test.go | 16 ++++++++-------- libcontainer/integration/checkpoint_test.go | 2 +- libcontainer/integration/exec_test.go | 10 +++++----- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/libcontainer/cgroups/fs/apply_raw_test.go b/libcontainer/cgroups/fs/apply_raw_test.go index f3b6556a..4971d547 100644 --- a/libcontainer/cgroups/fs/apply_raw_test.go +++ b/libcontainer/cgroups/fs/apply_raw_test.go @@ -13,7 +13,7 @@ import ( func TestInvalidCgroupPath(t *testing.T) { if cgroups.IsCgroup2UnifiedMode() { - t.Skip("cgroup v1 is not supported") + t.Skip("cgroup v2 is not supported") } root, err := getCgroupRoot() if err != nil { @@ -47,7 +47,7 @@ func TestInvalidCgroupPath(t *testing.T) { func TestInvalidAbsoluteCgroupPath(t *testing.T) { if cgroups.IsCgroup2UnifiedMode() { - t.Skip("cgroup v1 is not supported") + t.Skip("cgroup v2 is not supported") } root, err := getCgroupRoot() if err != nil { @@ -82,7 +82,7 @@ func TestInvalidAbsoluteCgroupPath(t *testing.T) { // XXX: Remove me after we get rid of configs.Cgroup.Name and configs.Cgroup.Parent. func TestInvalidCgroupParent(t *testing.T) { if cgroups.IsCgroup2UnifiedMode() { - t.Skip("cgroup v1 is not supported") + t.Skip("cgroup v2 is not supported") } root, err := getCgroupRoot() if err != nil { @@ -118,7 +118,7 @@ func TestInvalidCgroupParent(t *testing.T) { // XXX: Remove me after we get rid of configs.Cgroup.Name and configs.Cgroup.Parent. func TestInvalidAbsoluteCgroupParent(t *testing.T) { if cgroups.IsCgroup2UnifiedMode() { - t.Skip("cgroup v1 is not supported") + t.Skip("cgroup v2 is not supported") } root, err := getCgroupRoot() if err != nil { @@ -154,7 +154,7 @@ func TestInvalidAbsoluteCgroupParent(t *testing.T) { // XXX: Remove me after we get rid of configs.Cgroup.Name and configs.Cgroup.Parent. func TestInvalidCgroupName(t *testing.T) { if cgroups.IsCgroup2UnifiedMode() { - t.Skip("cgroup v1 is not supported") + t.Skip("cgroup v2 is not supported") } root, err := getCgroupRoot() if err != nil { @@ -191,7 +191,7 @@ func TestInvalidCgroupName(t *testing.T) { // XXX: Remove me after we get rid of configs.Cgroup.Name and configs.Cgroup.Parent. func TestInvalidAbsoluteCgroupName(t *testing.T) { if cgroups.IsCgroup2UnifiedMode() { - t.Skip("cgroup v1 is not supported") + t.Skip("cgroup v2 is not supported") } root, err := getCgroupRoot() if err != nil { @@ -227,7 +227,7 @@ func TestInvalidAbsoluteCgroupName(t *testing.T) { // XXX: Remove me after we get rid of configs.Cgroup.Name and configs.Cgroup.Parent. func TestInvalidCgroupNameAndParent(t *testing.T) { if cgroups.IsCgroup2UnifiedMode() { - t.Skip("cgroup v1 is not supported") + t.Skip("cgroup v2 is not supported") } root, err := getCgroupRoot() if err != nil { @@ -263,7 +263,7 @@ func TestInvalidCgroupNameAndParent(t *testing.T) { // XXX: Remove me after we get rid of configs.Cgroup.Name and configs.Cgroup.Parent. func TestInvalidAbsoluteCgroupNameAndParent(t *testing.T) { if cgroups.IsCgroup2UnifiedMode() { - t.Skip("cgroup v1 is not supported") + t.Skip("cgroup v2 is not supported") } root, err := getCgroupRoot() if err != nil { diff --git a/libcontainer/integration/checkpoint_test.go b/libcontainer/integration/checkpoint_test.go index cdb68105..552ebe8c 100644 --- a/libcontainer/integration/checkpoint_test.go +++ b/libcontainer/integration/checkpoint_test.go @@ -63,7 +63,7 @@ func testCheckpoint(t *testing.T, userns bool) { return } if cgroups.IsCgroup2UnifiedMode() { - t.Skip("cgroup v1 is not supported") + t.Skip("cgroup v2 is not supported") } root, err := newTestRoot() diff --git a/libcontainer/integration/exec_test.go b/libcontainer/integration/exec_test.go index 7822fa85..fa28e2db 100644 --- a/libcontainer/integration/exec_test.go +++ b/libcontainer/integration/exec_test.go @@ -208,7 +208,7 @@ func TestEnter(t *testing.T) { return } if cgroups.IsCgroup2UnifiedMode() { - t.Skip("cgroup v1 is not supported") + t.Skip("cgroup v2 is not supported") } rootfs, err := newRootfs() @@ -517,7 +517,7 @@ func testFreeze(t *testing.T, systemd bool) { return } if cgroups.IsCgroup2UnifiedMode() { - t.Skip("cgroup v1 is not supported") + t.Skip("cgroup v2 is not supported") } rootfs, err := newRootfs() @@ -574,7 +574,7 @@ func testCpuShares(t *testing.T, systemd bool) { return } if cgroups.IsCgroup2UnifiedMode() { - t.Skip("cgroup v1 is not supported") + t.Skip("cgroup v2 is not supported") } rootfs, err := newRootfs() @@ -609,7 +609,7 @@ func testPids(t *testing.T, systemd bool) { return } if cgroups.IsCgroup2UnifiedMode() { - t.Skip("cgroup v1 is not supported") + t.Skip("cgroup v2 is not supported") } rootfs, err := newRootfs() @@ -695,7 +695,7 @@ func testRunWithKernelMemory(t *testing.T, systemd bool) { return } if cgroups.IsCgroup2UnifiedMode() { - t.Skip("cgroup v1 is not supported") + t.Skip("cgroup v2 is not supported") } rootfs, err := newRootfs()