#
# Btrfs: fix clone to deal with holes when NO_HOLES feature is enabled
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+. ./common/preamble
+_begin_fstest auto quick clone
+# Override the default cleanup function.
_cleanup()
{
rm -fr $tmp
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
_require_btrfs_fs_feature "no_holes"
_require_btrfs_mkfs_feature "no-holes"
-rm -f $seqres.full
-
test_btrfs_clone_with_holes()
{
_scratch_mkfs "$1" >/dev/null 2>&1