This commit is contained in:
Lokesh Mandvekar 2025-06-18 19:15:49 +02:00 committed by GitHub
commit 3911a42de5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 32 additions and 1 deletions

View File

@ -8,6 +8,10 @@ load helpers.network
CHECKED_ROOTLESS= CHECKED_ROOTLESS=
function setup() { 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.... # None of these tests work rootless....
if is_rootless; then if is_rootless; then
# ...however, is that a genuine cast-in-stone limitation, or one # ...however, is that a genuine cast-in-stone limitation, or one

View File

@ -733,6 +733,20 @@ function is_aarch64() {
[ "$(uname -m)" == "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() { function selinux_enabled() {
/usr/sbin/selinuxenabled 2> /dev/null /usr/sbin/selinuxenabled 2> /dev/null
} }
@ -935,6 +949,17 @@ function skip_if_aarch64 {
fi 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 # die # Abort with helpful message
######### #########

View File

@ -4,6 +4,8 @@ set -exo pipefail
uname -r uname -r
cat /etc/redhat-release
loginctl enable-linger "$ROOTLESS_USER" loginctl enable-linger "$ROOTLESS_USER"
rpm -q \ rpm -q \
@ -23,7 +25,7 @@ rpm -q \
systemd systemd
export system_service_cmd="/usr/bin/podman system service --timeout=0 &" 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 [[ -z $1 ]]; then
if [[ $PODMAN == "/usr/bin/podman-remote" ]]; then if [[ $PODMAN == "/usr/bin/podman-remote" ]]; then