From cf8d8a05402e17390df078eec7f915d42f17500d Mon Sep 17 00:00:00 2001 From: Lokesh Mandvekar Date: Thu, 12 Jun 2025 12:19:52 -0400 Subject: [PATCH 1/3] System tests: export envvars for host distro and release Export HOST_DISTRO_NAME and HOST_DISTRO_RELEASE variables pointing to ID and and VERSION_ID vars in /etc/os-release. Signed-off-by: Lokesh Mandvekar --- test/system/helpers.bash | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/test/system/helpers.bash b/test/system/helpers.bash index e61c17f8e0..407d055c4b 100644 --- a/test/system/helpers.bash +++ b/test/system/helpers.bash @@ -41,7 +41,6 @@ if [ $(id -u) -eq 0 ]; then _LOG_PROMPT='#' fi -# Invocations via su may not set this. Although all container tools make # an effort to determine a default if unset, there are corner cases (rootless # namespace preservation) that run before the default is set. # For purposes of system tests (CI, gating, OpenQA) we force a default early. @@ -1371,6 +1370,22 @@ function wait_for_restart_count() { done } +############################ +# Get Host Distribution Info +############################ +function get_host_distribution_info() { + local osrelease=/etc/os-release + if [[ -e $osrelease ]]; then + # shellcheck source=/etc/os-release + HOST_DISTRO_NAME=$(source $osrelease; echo "$ID") + export HOST_DISTRO_NAME + # shellcheck source=/etc/os-release + HOST_DISTRO_RELEASE=$(source $osrelease; echo "$VERSION_ID") + export HOST_DISTRO_RELEASE + fi +} + +# Invocations via su may not set this. Although all container tools make # END miscellaneous tools ############################################################################### From b8a278165577d86295dd36bd0c51b11af69d2ace Mon Sep 17 00:00:00 2001 From: Lokesh Mandvekar Date: Fri, 20 Jun 2025 10:02:39 -0400 Subject: [PATCH 2/3] System tests: skip `checkpoint --export , with volumes` on rawhide Ref: https://github.com/containers/crun/issues/1770 Signed-off-by: Lokesh Mandvekar --- test/system/520-checkpoint.bats | 5 +++++ test/tmt/system.sh | 2 ++ 2 files changed, 7 insertions(+) diff --git a/test/system/520-checkpoint.bats b/test/system/520-checkpoint.bats index a581f1bf47..4b519a99c9 100644 --- a/test/system/520-checkpoint.bats +++ b/test/system/520-checkpoint.bats @@ -132,6 +132,11 @@ function setup() { # bats test_tags=ci:parallel @test "podman checkpoint --export, with volumes" { + get_host_distribution_info + if [[ "$HOST_DISTRO_NAME" == "fedora" && "$HOST_DISTRO_RELEASE" == "43" ]]; then + skip "Broken on Fedora 43: https://github.com/containers/crun/issues/1770" + fi + skip_if_remote "Test uses --root/--runroot, which are N/A over remote" local p_opts="$(podman_isolation_opts ${PODMAN_TMPDIR}) --events-backend file" diff --git a/test/tmt/system.sh b/test/tmt/system.sh index 3cd29dae03..0a98fc11b0 100644 --- a/test/tmt/system.sh +++ b/test/tmt/system.sh @@ -4,6 +4,8 @@ set -exo pipefail uname -r +cat /etc/os-release + loginctl enable-linger "$ROOTLESS_USER" rpm -q \ From c230d6b908b96a8620ca2461d7488362c2a3a35c Mon Sep 17 00:00:00 2001 From: Lokesh Mandvekar Date: Fri, 20 Jun 2025 16:23:32 -0400 Subject: [PATCH 3/3] try sourcing in test Signed-off-by: Lokesh Mandvekar --- test/system/520-checkpoint.bats | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/test/system/520-checkpoint.bats b/test/system/520-checkpoint.bats index 4b519a99c9..5159279e6e 100644 --- a/test/system/520-checkpoint.bats +++ b/test/system/520-checkpoint.bats @@ -132,9 +132,17 @@ function setup() { # bats test_tags=ci:parallel @test "podman checkpoint --export, with volumes" { - get_host_distribution_info - if [[ "$HOST_DISTRO_NAME" == "fedora" && "$HOST_DISTRO_RELEASE" == "43" ]]; then - skip "Broken on Fedora 43: https://github.com/containers/crun/issues/1770" +# get_host_distribution_info +# if [[ "$HOST_DISTRO_NAME" == "fedora" && "$HOST_DISTRO_RELEASE" == "43" ]]; then +# skip "Broken on Fedora 43: https://github.com/containers/crun/issues/1770" +# fi + local osrelease=/etc/os-release + if [[ -e $osrelease ]]; then + local osid=$(source $osrelease; echo $ID) + local osversion=$(source $osrelease; echo $VERSION_ID) + if [[ $osid == "fedora" && $osversion == "43" ]]; then + skip "Broken on Fedora 43: https://github.com/containers/crun/issues/1770" + fi fi skip_if_remote "Test uses --root/--runroot, which are N/A over remote"