mirror of
https://github.com/containers/podman.git
synced 2026-10-10 04:03:48 -04:00
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 <pholzing@redhat.com>
This commit is contained in:
2 files changed
+17
-6
No files matched your search
@@ -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
|
||||
}
|
||||
|
||||
|
||||
@@ -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 <<EOF
|
||||
[Container]
|
||||
Rootfs=$mountpoint:O
|
||||
Rootfs=$rootfs:O
|
||||
Exec=sh -c "echo STARTED CONTAINER; echo "READY=1" | socat -u STDIN unix-sendto:\$NOTIFY_SOCKET; top -b"
|
||||
Notify=yes
|
||||
EOF
|
||||
@@ -947,7 +951,6 @@ EOF
|
||||
|
||||
# Done. Clean up.
|
||||
service_cleanup $QUADLET_SERVICE_NAME failed
|
||||
run_podman image unmount $IMAGE
|
||||
}
|
||||
|
||||
@test "quadlet - selinux disable" {
|
||||
|
||||
Reference in new issue
Block a user