Fix skip message for cgroupv2

Signed-off-by: Boris Popovschi <zyqsempai@mail.ru>
This commit is contained in:
Boris Popovschi 2019-12-26 12:13:22 +02:00
parent cf9b7c33e1
commit 3b992087b8
3 changed files with 14 additions and 14 deletions

View File

@ -13,7 +13,7 @@ import (
func TestInvalidCgroupPath(t *testing.T) { func TestInvalidCgroupPath(t *testing.T) {
if cgroups.IsCgroup2UnifiedMode() { if cgroups.IsCgroup2UnifiedMode() {
t.Skip("cgroup v1 is not supported") t.Skip("cgroup v2 is not supported")
} }
root, err := getCgroupRoot() root, err := getCgroupRoot()
if err != nil { if err != nil {
@ -47,7 +47,7 @@ func TestInvalidCgroupPath(t *testing.T) {
func TestInvalidAbsoluteCgroupPath(t *testing.T) { func TestInvalidAbsoluteCgroupPath(t *testing.T) {
if cgroups.IsCgroup2UnifiedMode() { if cgroups.IsCgroup2UnifiedMode() {
t.Skip("cgroup v1 is not supported") t.Skip("cgroup v2 is not supported")
} }
root, err := getCgroupRoot() root, err := getCgroupRoot()
if err != nil { 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. // XXX: Remove me after we get rid of configs.Cgroup.Name and configs.Cgroup.Parent.
func TestInvalidCgroupParent(t *testing.T) { func TestInvalidCgroupParent(t *testing.T) {
if cgroups.IsCgroup2UnifiedMode() { if cgroups.IsCgroup2UnifiedMode() {
t.Skip("cgroup v1 is not supported") t.Skip("cgroup v2 is not supported")
} }
root, err := getCgroupRoot() root, err := getCgroupRoot()
if err != nil { 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. // XXX: Remove me after we get rid of configs.Cgroup.Name and configs.Cgroup.Parent.
func TestInvalidAbsoluteCgroupParent(t *testing.T) { func TestInvalidAbsoluteCgroupParent(t *testing.T) {
if cgroups.IsCgroup2UnifiedMode() { if cgroups.IsCgroup2UnifiedMode() {
t.Skip("cgroup v1 is not supported") t.Skip("cgroup v2 is not supported")
} }
root, err := getCgroupRoot() root, err := getCgroupRoot()
if err != nil { 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. // XXX: Remove me after we get rid of configs.Cgroup.Name and configs.Cgroup.Parent.
func TestInvalidCgroupName(t *testing.T) { func TestInvalidCgroupName(t *testing.T) {
if cgroups.IsCgroup2UnifiedMode() { if cgroups.IsCgroup2UnifiedMode() {
t.Skip("cgroup v1 is not supported") t.Skip("cgroup v2 is not supported")
} }
root, err := getCgroupRoot() root, err := getCgroupRoot()
if err != nil { 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. // XXX: Remove me after we get rid of configs.Cgroup.Name and configs.Cgroup.Parent.
func TestInvalidAbsoluteCgroupName(t *testing.T) { func TestInvalidAbsoluteCgroupName(t *testing.T) {
if cgroups.IsCgroup2UnifiedMode() { if cgroups.IsCgroup2UnifiedMode() {
t.Skip("cgroup v1 is not supported") t.Skip("cgroup v2 is not supported")
} }
root, err := getCgroupRoot() root, err := getCgroupRoot()
if err != nil { 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. // XXX: Remove me after we get rid of configs.Cgroup.Name and configs.Cgroup.Parent.
func TestInvalidCgroupNameAndParent(t *testing.T) { func TestInvalidCgroupNameAndParent(t *testing.T) {
if cgroups.IsCgroup2UnifiedMode() { if cgroups.IsCgroup2UnifiedMode() {
t.Skip("cgroup v1 is not supported") t.Skip("cgroup v2 is not supported")
} }
root, err := getCgroupRoot() root, err := getCgroupRoot()
if err != nil { 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. // XXX: Remove me after we get rid of configs.Cgroup.Name and configs.Cgroup.Parent.
func TestInvalidAbsoluteCgroupNameAndParent(t *testing.T) { func TestInvalidAbsoluteCgroupNameAndParent(t *testing.T) {
if cgroups.IsCgroup2UnifiedMode() { if cgroups.IsCgroup2UnifiedMode() {
t.Skip("cgroup v1 is not supported") t.Skip("cgroup v2 is not supported")
} }
root, err := getCgroupRoot() root, err := getCgroupRoot()
if err != nil { if err != nil {

View File

@ -63,7 +63,7 @@ func testCheckpoint(t *testing.T, userns bool) {
return return
} }
if cgroups.IsCgroup2UnifiedMode() { if cgroups.IsCgroup2UnifiedMode() {
t.Skip("cgroup v1 is not supported") t.Skip("cgroup v2 is not supported")
} }
root, err := newTestRoot() root, err := newTestRoot()

View File

@ -208,7 +208,7 @@ func TestEnter(t *testing.T) {
return return
} }
if cgroups.IsCgroup2UnifiedMode() { if cgroups.IsCgroup2UnifiedMode() {
t.Skip("cgroup v1 is not supported") t.Skip("cgroup v2 is not supported")
} }
rootfs, err := newRootfs() rootfs, err := newRootfs()
@ -517,7 +517,7 @@ func testFreeze(t *testing.T, systemd bool) {
return return
} }
if cgroups.IsCgroup2UnifiedMode() { if cgroups.IsCgroup2UnifiedMode() {
t.Skip("cgroup v1 is not supported") t.Skip("cgroup v2 is not supported")
} }
rootfs, err := newRootfs() rootfs, err := newRootfs()
@ -574,7 +574,7 @@ func testCpuShares(t *testing.T, systemd bool) {
return return
} }
if cgroups.IsCgroup2UnifiedMode() { if cgroups.IsCgroup2UnifiedMode() {
t.Skip("cgroup v1 is not supported") t.Skip("cgroup v2 is not supported")
} }
rootfs, err := newRootfs() rootfs, err := newRootfs()
@ -609,7 +609,7 @@ func testPids(t *testing.T, systemd bool) {
return return
} }
if cgroups.IsCgroup2UnifiedMode() { if cgroups.IsCgroup2UnifiedMode() {
t.Skip("cgroup v1 is not supported") t.Skip("cgroup v2 is not supported")
} }
rootfs, err := newRootfs() rootfs, err := newRootfs()
@ -695,7 +695,7 @@ func testRunWithKernelMemory(t *testing.T, systemd bool) {
return return
} }
if cgroups.IsCgroup2UnifiedMode() { if cgroups.IsCgroup2UnifiedMode() {
t.Skip("cgroup v1 is not supported") t.Skip("cgroup v2 is not supported")
} }
rootfs, err := newRootfs() rootfs, err := newRootfs()