mirror of
https://github.com/containers/podman.git
synced 2025-05-17 23:26:08 +08:00
system-tests: switch ls with getfattr for selinux tests
The test `podman selinux: check unsupported relabel` has been failing recently on Fedora rawhide. This is due to a regression in the `ls` command itself. Workaround for now is to switch to `getfattr -n security.selinux ...`. Ref: https://github.com/containers/podman/issues/25132#issuecomment-2615744915 Fixes: #25132 Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
This commit is contained in:
@ -384,20 +384,21 @@ EOF
|
||||
|
||||
mount --type tmpfs -o "context=\"$LABEL\"" tmpfs $tmpdir
|
||||
|
||||
run ls -dZ ${tmpdir}
|
||||
is "$output" "${LABEL} ${tmpdir}" "No Relabel Correctly"
|
||||
run getfattr --only-values --absolute-names -n security.selinux ${tmpdir}
|
||||
is "$output" "${LABEL}" "No Relabel Correctly"
|
||||
|
||||
run_podman run --rm -v $tmpdir:/test:z --privileged $IMAGE true
|
||||
run ls -dZ $tmpdir
|
||||
is "$output" "${LABEL} $tmpdir" "Ignored shared relabel Correctly"
|
||||
run getfattr --only-values --absolute-names -n security.selinux ${tmpdir}
|
||||
is "$output" "${LABEL}" "Ignored shared relabel Correctly"
|
||||
|
||||
run_podman run --rm -v $tmpdir:/test:Z --privileged $IMAGE true
|
||||
run ls -dZ $tmpdir
|
||||
is "$output" "${LABEL} $tmpdir" "Ignored private relabel Correctly"}
|
||||
run getfattr --only-values --absolute-names -n security.selinux ${tmpdir}
|
||||
is "$output" "${LABEL}" "Ignored private relabel Correctly"
|
||||
umount $tmpdir
|
||||
|
||||
run_podman run --rm -v $tmpdir:/test:z --privileged $IMAGE true
|
||||
run ls -dZ $tmpdir
|
||||
is "$output" "${RELABEL} $tmpdir" "Ignored private relabel Correctly"}
|
||||
run getfattr --only-values --absolute-names -n security.selinux ${tmpdir}
|
||||
is "$output" "${RELABEL}" "Ignored private relabel Correctly"
|
||||
}
|
||||
|
||||
# vim: filetype=sh
|
||||
|
Reference in New Issue
Block a user