xfs: add a _require_xfs_copy helper

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>
This commit is contained in:
Darrick J. Wong
2020-09-14 18:43:59 -07:00
committed by Eryu Guan
parent ff334a75e2
commit a98a9c291a
6 changed files with 12 additions and 11 deletions
+1 -3
View File
@@ -25,9 +25,7 @@ _supported_os Linux
_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
+1 -4
View File
@@ -113,10 +113,7 @@ _supported_fs xfs
_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
+1 -2
View File
@@ -35,8 +35,7 @@ _cleanup()
_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
+1 -2
View File
@@ -34,8 +34,7 @@ rm -f $seqres.full
# 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
+1
View File
@@ -33,6 +33,7 @@ testdir=$TEST_DIR/test-$seq
_supported_os Linux
_supported_fs xfs
_require_xfs_copy
_require_scratch_nocheck
_require_populate_commands