Skip to content

System tests: skip checkpoint tests on Fedora Rawhide/RHEL/CentOS Stream #26319

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions test/system/520-checkpoint.bats
Original file line number Diff line number Diff line change
Expand Up @@ -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
Comment on lines +11 to +13
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is fundamentally incorrect in my eyes.

First this should be tested on RHEL/centos in general, if this breaks there than this is highly concerning and there must be clear bug reports linked why it is skipped so QE people can unskip it once the issue is fixed. Otherwise we never catch new issues there which means they won't get fixed either.

As for rawhide there is only a single test case that fails so it should only skip that specific one.


# None of these tests work rootless....
if is_rootless; then
# ...however, is that a genuine cast-in-stone limitation, or one
Expand Down
25 changes: 25 additions & 0 deletions test/system/helpers.bash
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Comment on lines +736 to +748
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be cached? Also hard coded to redhat/fedora-release seems unnecessary.
I would think the best way would be to parse /etc/os-release and then safe ID and VERSION_ID fields like done in e2e tests, i.e. GetHostDistributionInfo()?


function selinux_enabled() {
/usr/sbin/selinuxenabled 2> /dev/null
}
Expand Down Expand Up @@ -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
#########
Expand Down
4 changes: 3 additions & 1 deletion test/tmt/system.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ set -exo pipefail

uname -r

cat /etc/redhat-release

loginctl enable-linger "$ROOTLESS_USER"

rpm -q \
Expand All @@ -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
Expand Down