Skip to content

Commit eea2866

Browse files
Merge pull request #25133 from lsm5/rawhide-selinux-system-test
system-tests: switch ls with getfattr for selinux tests
2 parents aa1cf02 + 06c1034 commit eea2866

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

test/system/410-selinux.bats

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -384,20 +384,21 @@ EOF
384384

385385
mount --type tmpfs -o "context=\"$LABEL\"" tmpfs $tmpdir
386386

387-
run ls -dZ ${tmpdir}
388-
is "$output" "${LABEL} ${tmpdir}" "No Relabel Correctly"
387+
run getfattr --only-values --absolute-names -n security.selinux ${tmpdir}
388+
is "$output" "${LABEL}" "No Relabel Correctly"
389+
389390
run_podman run --rm -v $tmpdir:/test:z --privileged $IMAGE true
390-
run ls -dZ $tmpdir
391-
is "$output" "${LABEL} $tmpdir" "Ignored shared relabel Correctly"
391+
run getfattr --only-values --absolute-names -n security.selinux ${tmpdir}
392+
is "$output" "${LABEL}" "Ignored shared relabel Correctly"
392393

393394
run_podman run --rm -v $tmpdir:/test:Z --privileged $IMAGE true
394-
run ls -dZ $tmpdir
395-
is "$output" "${LABEL} $tmpdir" "Ignored private relabel Correctly"}
395+
run getfattr --only-values --absolute-names -n security.selinux ${tmpdir}
396+
is "$output" "${LABEL}" "Ignored private relabel Correctly"
396397
umount $tmpdir
397398

398399
run_podman run --rm -v $tmpdir:/test:z --privileged $IMAGE true
399-
run ls -dZ $tmpdir
400-
is "$output" "${RELABEL} $tmpdir" "Ignored private relabel Correctly"}
400+
run getfattr --only-values --absolute-names -n security.selinux ${tmpdir}
401+
is "$output" "${RELABEL}" "Ignored private relabel Correctly"
401402
}
402403

403404
# vim: filetype=sh

0 commit comments

Comments
 (0)