Merge Fix swap regression test on btrfs

As per !1462 it turns out that the swap regression test on btrfs also needs special casing in order to work properly. This is an analogous patch to check for btrfs.

Signed-off-by: Ryan Lee <ryan.lee@canonical.com>

MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/1463
Approved-by: Georgia Garcia <georgia.garcia@canonical.com>
Merged-by: Georgia Garcia <georgia.garcia@canonical.com>
This commit is contained in:
Georgia Garcia 2024-12-13 20:32:01 +00:00
commit 6d7b5df947

View file

@ -31,7 +31,8 @@ swap_file=$tmpdir/swapfile
# check if we can run the test in tmpdir
fstype=$(stat -f --format '%T' "${tmpdir}")
if [ "${fstype}" = "tmpfs" ] || [ "${fstype}" = "zfs" ] ; then
if [ "${fstype}" = "tmpfs" ] || [ "${fstype}" = "zfs" ] \
|| [ "${fstype}" = "btrfs" ]; then
# create a mountpoint not tmpfs or zfs
mount_file=$tmpdir/mountfile
mount_point=$tmpdir/mountpoint