From af3c5699a5a4a067f011960748ab71b5b44d6d52 Mon Sep 17 00:00:00 2001 From: Kir Kolyshkin Date: Wed, 14 Apr 2021 16:27:17 -0700 Subject: [PATCH] libct/int: remove unused code Since commit 88e8350de28e2 the error message is different, so the check is not working. In addition, for the cgroup v2 case, and it seems that PID controller is always available these days. Signed-off-by: Kir Kolyshkin --- libcontainer/integration/exec_test.go | 9 --------- 1 file changed, 9 deletions(-) diff --git a/libcontainer/integration/exec_test.go b/libcontainer/integration/exec_test.go index 95b132c76..8fef3d347 100644 --- a/libcontainer/integration/exec_test.go +++ b/libcontainer/integration/exec_test.go @@ -612,9 +612,6 @@ func testPids(t *testing.T, systemd bool) { // Running multiple processes. _, ret, err := runContainer(t, config, "", "/bin/sh", "-c", "/bin/true | /bin/true | /bin/true | /bin/true") - if err != nil && strings.Contains(err.Error(), "no such directory for pids.max") { - t.Skip("PIDs cgroup is unsupported") - } ok(t, err) if ret != 0 { @@ -629,9 +626,6 @@ func testPids(t *testing.T, systemd bool) { /bin/true | /bin/true | /bin/true | /bin/true | /bin/true | /bin/true | bin/true | /bin/true | /bin/true | /bin/true | /bin/true | /bin/true | /bin/true | /bin/true | bin/true | /bin/true | /bin/true | /bin/true | /bin/true | /bin/true | /bin/true | /bin/true | bin/true | /bin/true`) - if err != nil && strings.Contains(err.Error(), "no such directory for pids.max") { - t.Skip("PIDs cgroup is unsupported") - } ok(t, err) if ret != 0 { @@ -650,9 +644,6 @@ func testPids(t *testing.T, systemd bool) { /bin/true | /bin/true | /bin/true | /bin/true | /bin/true | /bin/true | bin/true | /bin/true | /bin/true | /bin/true | /bin/true | /bin/true | /bin/true | /bin/true | bin/true | /bin/true | /bin/true | /bin/true | /bin/true | /bin/true | /bin/true | /bin/true | bin/true | /bin/true`) - if err != nil && strings.Contains(err.Error(), "no such directory for pids.max") { - t.Skip("PIDs cgroup is unsupported") - } if err != nil && !strings.Contains(out.String(), "sh: can't fork") { ok(t, err) }