mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
xfstests: add _require_sparse_files
Add a helper to check if the filesystem supports sparse files. This is used to guard tests that exercise sparse file functionality and would take forever on filesystems that have to zero all blocks on extending truncates. Unfortunately there's no good way to autodetect this functionality, so just implement it as a blacklist for now. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Dave Chinner <dchinner@redhat.com>
This commit is contained in:
@@ -857,6 +857,22 @@ _require_fs_space()
|
||||
_notrun "This test requires at least ${GB}GB free on $MNT to run"
|
||||
}
|
||||
|
||||
#
|
||||
# Check if the filesystem supports sparse files.
|
||||
#
|
||||
# Unfortunately there is no better way to do this than a manual black list.
|
||||
#
|
||||
_require_sparse_files()
|
||||
{
|
||||
case $FSTYP in
|
||||
hfsplus)
|
||||
_notrun "Sparse files not supported by this filesystem type: $FSTYP"
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
# check that a FS on a device is mounted
|
||||
# if so, return mount point
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user