Skip to content

Commit 9b2d1ea

Browse files
committed
test/system: delete CgV1 skips and skipped CgV2 tests
Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>
1 parent d1d1bb8 commit 9b2d1ea

11 files changed

+6
-71
lines changed

test/system/030-run.bats

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,6 @@ EOF
122122

123123
# bats test_tags=ci:parallel
124124
@test "podman run - uidmapping has no /sys/kernel mounts" {
125-
skip_if_cgroupsv1 "run --uidmap fails on cgroups v1 (issue 15025, wontfix)"
126125
skip_if_rootless "cannot umount as rootless"
127126

128127
run_podman run --rm --uidmap 0:100:10000 $IMAGE mount
@@ -1081,7 +1080,6 @@ EOF
10811080
# rhbz#1902979 : podman run fails to update /etc/hosts when --uidmap is provided
10821081
# bats test_tags=ci:parallel
10831082
@test "podman run update /etc/hosts" {
1084-
skip_if_cgroupsv1 "run --uidmap fails on cgroups v1 (issue 15025, wontfix)"
10851083
HOST=$(random_string 25)
10861084
run_podman run --uidmap 0:10001:10002 --rm --hostname ${HOST} $IMAGE grep ${HOST} /etc/hosts
10871085
is "${lines[0]}" ".*${HOST}.*"
@@ -1451,21 +1449,13 @@ EOF
14511449

14521450
# bats test_tags=ci:parallel
14531451
@test "podman run --net=host --cgroupns=host with read only cgroupfs" {
1454-
skip_if_rootless_cgroupsv1
1452+
# verify that the last /sys/fs/cgroup mount is read-only
1453+
run_podman run --net=host --cgroupns=host --rm $IMAGE sh -c "grep ' / /sys/fs/cgroup ' /proc/self/mountinfo | tail -n 1"
1454+
assert "$output" =~ "/sys/fs/cgroup ro"
14551455

1456-
if is_cgroupsv1; then
1457-
# verify that the memory controller is mounted read-only
1458-
run_podman run --net=host --cgroupns=host --rm $IMAGE cat /proc/self/mountinfo
1459-
assert "$output" =~ "/sys/fs/cgroup/memory ro.* cgroup cgroup"
1460-
else
1461-
# verify that the last /sys/fs/cgroup mount is read-only
1462-
run_podman run --net=host --cgroupns=host --rm $IMAGE sh -c "grep ' / /sys/fs/cgroup ' /proc/self/mountinfo | tail -n 1"
1463-
assert "$output" =~ "/sys/fs/cgroup ro"
1464-
1465-
# verify that it works also with a cgroupns
1466-
run_podman run --net=host --cgroupns=private --rm $IMAGE sh -c "grep ' / /sys/fs/cgroup ' /proc/self/mountinfo | tail -n 1"
1467-
assert "$output" =~ "/sys/fs/cgroup ro"
1468-
fi
1456+
# verify that it works also with a cgroupns
1457+
run_podman run --net=host --cgroupns=private --rm $IMAGE sh -c "grep ' / /sys/fs/cgroup ' /proc/self/mountinfo | tail -n 1"
1458+
assert "$output" =~ "/sys/fs/cgroup ro"
14691459
}
14701460

14711461
# bats test_tags=ci:parallel

test/system/170-run-userns.bats

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ function _require_crun() {
3333

3434
# bats test_tags=ci:parallel
3535
@test "podman --group-add without keep-groups while in a userns" {
36-
skip_if_cgroupsv1 "run --uidmap fails on cgroups v1 (issue 15025, wontfix)"
3736
skip_if_rootless "chroot is not allowed in rootless mode"
3837
skip_if_remote "--group-add keep-groups not supported in remote mode"
3938
run chroot --groups 1234,5678 / ${PODMAN} run --rm --uidmap 0:200000:5000 --group-add 457 $IMAGE id
@@ -42,7 +41,6 @@ function _require_crun() {
4241

4342
# bats test_tags=ci:parallel
4443
@test "rootful pod with custom ID mapping" {
45-
skip_if_cgroupsv1 "run --uidmap fails on cgroups v1 (issue 15025, wontfix)"
4644
skip_if_rootless "does not work rootless - rootful feature"
4745
random_pod_name=p_$(safename)
4846
run_podman pod create --uidmap 0:200000:5000 --name=$random_pod_name

test/system/200-pod.bats

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -535,7 +535,6 @@ spec:
535535
@test "pod resource limits" {
536536
skip_if_remote "resource limits only implemented on non-remote"
537537
skip_if_rootless "resource limits only work with root"
538-
skip_if_cgroupsv1 "resource limits only meaningful on cgroups V2"
539538

540539
# create loopback device
541540
lofile=${PODMAN_TMPDIR}/disk.img
@@ -762,7 +761,6 @@ function thingy_with_unique_id() {
762761
# bats test_tags=ci:parallel
763762
@test "podman pod cleans cgroup and keeps limits" {
764763
skip_if_remote "we cannot check cgroup settings"
765-
skip_if_rootless_cgroupsv1 "rootless cannot use cgroups on v1"
766764

767765
for infra in true false; do
768766
run_podman pod create --infra=$infra --memory=256M

test/system/250-systemd.bats

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -316,13 +316,6 @@ LISTEN_FDNAMES=listen_fdnames" | sort)
316316
run_podman rm $cname
317317
}
318318

319-
@test "podman --systemd fails on cgroup v1 with a private cgroupns" {
320-
skip_if_cgroupsv2
321-
322-
run_podman 126 run --systemd=always --cgroupns=private $IMAGE true
323-
assert "$output" =~ ".*cgroup namespace is not supported with cgroup v1 and systemd mode"
324-
}
325-
326319
# https://github.com/containers/podman/issues/13153
327320
@test "podman rootless-netns processes should be in different cgroup" {
328321
is_rootless || skip "only meaningful for rootless"

test/system/252-quadlet.bats

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ function start_time() {
2020

2121
function setup() {
2222
skip_if_remote "quadlet tests are meaningless over remote"
23-
skip_if_rootless_cgroupsv1 "Can't use --cgroups=split w/ CGv1 (issue 17456, wontfix)"
2423
skip_if_journald_unavailable "Needed for RHEL. FIXME: we might be able to re-enable a subset of tests."
2524

2625
test -x "$QUADLET" || die "Cannot run quadlet tests without executable \$QUADLET ($QUADLET)"

test/system/253-podman-quadlet.bats

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ load helpers.systemd
1010

1111
function setup() {
1212
skip_if_remote "podman quadlet is not implemented for remote setup yet"
13-
skip_if_rootless_cgroupsv1 "Can't use --cgroups=split w/ CGv1 (issue 17456, wontfix)"
1413
skip_if_journald_unavailable "Needed for RHEL. FIXME: we might be able to re-enable a subset of tests."
1514

1615
test -x "$QUADLET" || die "Cannot run quadlet tests without executable \$QUADLET ($QUADLET)"

test/system/400-unprivileged-access.bats

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
load helpers
88

99
@test "podman container storage is not accessible by unprivileged users" {
10-
skip_if_cgroupsv1 "run --uidmap fails on cgroups v1 (issue 15025, wontfix)"
1110
skip_if_rootless "test meaningless without suid"
1211
skip_if_remote
1312

test/system/410-selinux.bats

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -152,10 +152,6 @@ function check_label() {
152152
@test "podman selinux: shared context in (some) namespaces" {
153153
skip_if_no_selinux
154154

155-
# rootless users have no usable cgroups with cgroupsv1, so containers
156-
# must use a pid namespace and not join an existing one.
157-
skip_if_rootless_cgroupsv1
158-
159155
if [[ $(podman_runtime) == "runc" ]]; then
160156
skip "some sort of runc bug, not worth fixing (issue 11784, wontfix)"
161157
fi

test/system/420-cgroups.bats

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ load helpers
99
@test "podman run, preserves initial --cgroup-manager" {
1010
skip_if_remote "podman-remote does not support --cgroup-manager"
1111

12-
skip_if_rootless_cgroupsv1
13-
1412
# Find out our default cgroup manager, and from that, get the non-default
1513
run_podman info --format '{{.Host.CgroupManager}}'
1614
case "$output" in
@@ -41,7 +39,6 @@ load helpers
4139
# bats test_tags=ci:parallel
4240
@test "podman run --cgroups=disabled keeps the current cgroup" {
4341
skip_if_remote "podman-remote does not support --cgroups=disabled"
44-
skip_if_rootless_cgroupsv1
4542
runtime=$(podman_runtime)
4643
if [[ $runtime != "crun" ]]; then
4744
skip "runtime is $runtime; --cgroups=disabled requires crun"

test/system/500-networking.bats

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,6 @@ load helpers.network
114114
# Issue #5466 - port-forwarding doesn't work with this option and -d
115115
# FIXME: random_rfc1918_subnet is not parallel-safe
116116
@test "podman networking: port with --userns=keep-id for rootless or --uidmap=* for rootful" {
117-
skip_if_cgroupsv1 "run --uidmap fails on cgroups v1 (issue 15025, wontfix)"
118117
for cidr in "" "$(random_rfc1918_subnet).0/24"; do
119118
myport=$(random_free_port 52000-52999)
120119
if [[ -z $cidr ]]; then
@@ -878,7 +877,6 @@ EOF
878877

879878
# bats test_tags=ci:parallel
880879
@test "podman run /etc/* permissions" {
881-
skip_if_cgroupsv1 "run --uidmap fails on cgroups v1 (issue 15025, wontfix)"
882880
userns="--userns=keep-id"
883881
if ! is_rootless; then
884882
userns="--uidmap=0:1111111:65536 --gidmap=0:1111111:65536"
@@ -992,8 +990,6 @@ EOF
992990
# Test for https://github.com/containers/podman/issues/18615
993991
# CANNOT BE PARALLELIZED due to strict checking of /run/netns
994992
@test "podman network cleanup --userns + --restart" {
995-
skip_if_cgroupsv1 "run --uidmap fails on cgroups v1 (issue 15025, wontfix)"
996-
997993
local net1=net-a-$(safename)
998994
# use /29 subnet to limit available ip space, a 29 gives 5 usable addresses (6 - 1 for the gw)
999995
local subnet="$(random_rfc1918_subnet).0/29"

0 commit comments

Comments
 (0)