2
0
mirror of https://gitlab.com/apparmor/apparmor synced 2025-08-30 13:58:22 +00:00

regression tests: make mount regression tests report skipped options

Don't silently skip options so that we know what is being tested.

Signed-off-by: John Johansen <john.johansen@canonical.com>
This commit is contained in:
John Johansen
2023-04-27 05:50:09 -07:00
parent 89bc617d0d
commit f3d5531516

View File

@@ -157,6 +157,8 @@ run_all_combinations_test() {
genprofile cap:sys_admin "mount:ALL" "qual=deny:mount:options=($combination)"
runchecktest "MOUNT (confined cap mount combination deny test $combination)" fail mount ${loop_device} ${mount_point} -o $combination
remove_mnt
else
echo " not supported by parser - skipping mount option=($combination),"
fi
genprofile cap:sys_admin "mount:options=(rw)"
@@ -167,6 +169,7 @@ run_all_combinations_test() {
test_nonfs_options() {
if [ "$(parser_supports "mount options=($1),")" != "true" ] ; then
echo " not supported by parser - skipping mount options=($1),"
return
fi
@@ -185,6 +188,7 @@ test_nonfs_options() {
test_dir_options() {
if [ "$(parser_supports "mount options=($1),")" != "true" ] ; then
echo " not supported by parser - skipping mount option=($1),"
return
fi
@@ -202,6 +206,7 @@ test_dir_options() {
test_propagation_options() {
if [ "$(parser_supports "mount options=($1),")" != "true" ] ; then
echo " not supported by parser - skipping mount option=($1),"
return
fi
@@ -307,6 +312,7 @@ remove_mnt
if [ "$(kernel_features mount)" != "true" -o "$(parser_supports 'mount,')" != "true" ] ; then
echo " mount rules not supported, using capability check ..."
genprofile capability:sys_admin
runchecktest "MOUNT (confined cap)" pass mount ${loop_device} ${mount_point}
remove_mnt