Add a _require helper so that tests can ensure that they're running in
the correct environment for xfs_copy to work (no external devices).
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Zorro Lang <zlang@redhat.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
fi
rm -f $tmp.mkfs
}
+
+_require_xfs_copy()
+{
+ [ -n "$XFS_COPY_PROG" ] || _notrun "xfs_copy binary not yet installed"
+ [ "$USE_EXTERNAL" = yes ] && \
+ _notrun "Cannot xfs_copy with external devices"
+}
_require_scratch
_require_test_program "feature"
-
-[ "$USE_EXTERNAL" = yes ] && _notrun "Cannot xfs_copy with external devices"
-[ -n "$XFS_COPY_PROG" ] || _notrun "xfs_copy binary not yet installed"
+_require_xfs_copy
rm -f $seqres.full
_supported_os Linux
_require_test
_require_attrs
-
-[ "$USE_EXTERNAL" = yes ] && _notrun "Cannot xfs_copy with external devices"
-[ -n "$XFS_COPY_PROG" ] || _notrun "xfs_copy binary not yet installed"
-
+_require_xfs_copy
_require_scratch
_require_loop
_supported_fs xfs
_supported_os Linux
-# xfs_copy does not support realtime devices
-_require_no_realtime
+_require_xfs_copy
_require_scratch
_require_no_large_scratch_dev
_require_xfs_crc
# real QA test starts here
_supported_fs xfs
_supported_os Linux
-# xfs_copy does not support realtime devices
-_require_no_realtime
+_require_xfs_copy
_require_test
_require_scratch
_require_no_large_scratch_dev
_supported_os Linux
_supported_fs xfs
+_require_xfs_copy
_require_scratch_nocheck
_require_populate_commands