From f9db3cbd2b04bda79a3063a20548b1d85afcd01a Mon Sep 17 00:00:00 2001 From: Paul Holzinger Date: Wed, 27 May 2026 19:44:23 +0200 Subject: [PATCH] test/system: do not use image mount as rootfs source This started to fail on fedora rawhide with kernel 7.1. I have not looked into why exactly why but the theory from commit 12d40777f0 is likely related. What I do not get is why this tests seem to pass elsewhere, i.e. it passes in openQA and testing farm but not in our custom lima based VMs. Lets hope this works better. Signed-off-by: Paul Holzinger --- test/system/030-run.bats | 14 +++++++++++--- test/system/252-quadlet.bats | 9 ++++++--- 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/test/system/030-run.bats b/test/system/030-run.bats index a3bc64fa87..23922b4385 100644 --- a/test/system/030-run.bats +++ b/test/system/030-run.bats @@ -827,18 +827,26 @@ json-file | f # image mount is hard to test as a rootless user # and does not work remotely run_podman image mount $IMAGE - romount="$output" + mountpoint="$output" + + rootfs=$PODMAN_TMPDIR/rootfs + cp -a "$mountpoint" "$rootfs" + # Make rootfs actually read only + mount --bind -o ro "$rootfs" "$rootfs" + + run_podman image unmount $IMAGE randomname=c_$(safename) # :O (overlay) required with rootfs; see #14504 - run_podman run --name=$randomname --rootfs $romount:O echo "Hello world" + run_podman run --name=$randomname --rootfs $rootfs:O echo "Hello world" is "$output" "Hello world" run_podman container inspect $randomname --format "{{.ImageDigest}}" is "$output" "" "Empty image digest for --rootfs container" + umount "$rootfs" + run_podman rm -f -t0 $randomname - run_podman image unmount $IMAGE fi } diff --git a/test/system/252-quadlet.bats b/test/system/252-quadlet.bats index fb08979924..9b554591fc 100644 --- a/test/system/252-quadlet.bats +++ b/test/system/252-quadlet.bats @@ -926,16 +926,20 @@ EOF } @test "quadlet - rootfs" { - skip_if_no_selinux skip_if_rootless run_podman image mount $IMAGE mountpoint="$output" + rootfs=$PODMAN_TMPDIR/rootfs + cp -a "$mountpoint" "$rootfs" + + run_podman image unmount $IMAGE + local quadlet_file=$PODMAN_TMPDIR/basic_$(safename).container cat > $quadlet_file <