mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
fstests: introduce _exclude_scratch_mount_option helper
Some tests require that there's no certain mount option in MKFS_OPTIONS, so introduce a new helper _exclude_scratch_mount_option() to do the check on $MOUNT_OPTIONS. Also convert generic/192 and xfs/134 to use this helper. Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Eryu Guan <eguan@redhat.com>
This commit is contained in:
@@ -2926,8 +2926,17 @@ _require_cloner()
|
||||
_notrun "cloner binary not present at $CLONER_PROG"
|
||||
}
|
||||
|
||||
# skip test if MKFS_OPTIONS contains the given string
|
||||
_exclude_scratch_mount_option()
|
||||
{
|
||||
if echo $MOUNT_OPTIONS | grep -q "$1"; then
|
||||
_notrun "mount option \"$1\" not allowed in this test"
|
||||
fi
|
||||
}
|
||||
|
||||
_require_atime()
|
||||
{
|
||||
_exclude_scratch_mount_option "noatime"
|
||||
if [ "$FSTYP" == "nfs" ]; then
|
||||
_notrun "atime related mount options have no effect on NFS"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user