diff --git a/test/system/520-checkpoint.bats b/test/system/520-checkpoint.bats index a581f1bf47..664c39d3d0 100644 --- a/test/system/520-checkpoint.bats +++ b/test/system/520-checkpoint.bats @@ -8,6 +8,10 @@ load helpers.network CHECKED_ROOTLESS= function setup() { + # Often breaks on RHEL/CentOS Stream and Fedora Rawhide + skip_if_rhel_or_centos + skip_if_rawhide + # None of these tests work rootless.... if is_rootless; then # ...however, is that a genuine cast-in-stone limitation, or one diff --git a/test/system/helpers.bash b/test/system/helpers.bash index e61c17f8e0..ef0123f535 100644 --- a/test/system/helpers.bash +++ b/test/system/helpers.bash @@ -733,6 +733,20 @@ function is_aarch64() { [ "$(uname -m)" == "aarch64" ] } +function is_rhel_or_centos() { + if find /etc/redhat-release && grep -Eiq "Red Hat Enterprise Linux|CentOS Stream" /etc/redhat-release; then + return 0 + fi + return 1 +} + +function is_rawhide() { + if find /etc/fedora-release && grep -Eiq "Rawhide" /etc/fedora-release; then + return 0 + fi + return 1 +} + function selinux_enabled() { /usr/sbin/selinuxenabled 2> /dev/null } @@ -935,6 +949,17 @@ function skip_if_aarch64 { fi } +function skip_if_rhel_or_centos { + if is_rhel_or_centos; then + skip "${msg:-skip if RHEL or CentOS Stream}" + fi +} + +function skip_if_rawhide { + if is_rawhide; then + skip "${msg:-skip if Fedora Rawhide}" + fi +} ######### # die # Abort with helpful message ######### diff --git a/test/tmt/system.sh b/test/tmt/system.sh index 3cd29dae03..0408b49098 100644 --- a/test/tmt/system.sh +++ b/test/tmt/system.sh @@ -4,6 +4,8 @@ set -exo pipefail uname -r +cat /etc/redhat-release + loginctl enable-linger "$ROOTLESS_USER" rpm -q \ @@ -23,7 +25,7 @@ rpm -q \ systemd export system_service_cmd="/usr/bin/podman system service --timeout=0 &" -export test_cmd="whoami && cd /usr/share/podman/test/system && PODMAN_TESTING=/usr/bin/podman-testing bats ." +export test_cmd="whoami && cd /usr/share/podman/test/system && PODMAN_TESTING=/usr/bin/podman-testing bats 520-checkpoint.bats" if [[ -z $1 ]]; then if [[ $PODMAN == "/usr/bin/podman-remote" ]]; then