From b82ae3afdc8be7b26d454f85d2dbd3f3081a495a Mon Sep 17 00:00:00 2001 From: Kir Kolyshkin Date: Sat, 18 Oct 2025 12:52:17 -0700 Subject: [PATCH] tests/int/delete: fix pause test for rootless case The "runc delete --force [paused container]" test case does not check runc pause exit code, and if added, the test fails in rootless tests, because: - not all rootless tests have access to cgroups; - rootless containers doesn't have default cgroups path. To fix, add: - setup for rootless case; - require cgroups_freezer; - runc pause exit code check. Signed-off-by: Kir Kolyshkin --- tests/integration/delete.bats | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/integration/delete.bats b/tests/integration/delete.bats index 967f8e25f..78321c3b4 100644 --- a/tests/integration/delete.bats +++ b/tests/integration/delete.bats @@ -142,11 +142,19 @@ function test_runc_delete_host_pidns() { } @test "runc delete --force [paused container]" { + requires cgroups_freezer + if [ $EUID -ne 0 ]; then + requires rootless_cgroup + # Rootless containers have no default cgroup path. + set_cgroups_path + fi + runc run -d --console-socket "$CONSOLE_SOCKET" ct1 [ "$status" -eq 0 ] testcontainer ct1 running runc pause ct1 + [ "$status" -eq 0 ] runc delete --force ct1 [ "$status" -eq 0 ] }