aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@kernel.org>2024-02-06 18:19:19 -0800
committerZorro Lang <zlang@kernel.org>2024-02-09 13:27:17 +0800
commitb809844c72b97b2ac0a01ffb7b7f114bf6364028 (patch)
tree50c9a0b19cf95a550674b1228baffa4c9f16c1eb
parent76bfc02c31b86e5c730d33c2c64723b364a5926d (diff)
downloadxfstests-dev-b809844c72b97b2ac0a01ffb7b7f114bf6364028.tar.gz
xfs/503: split copy and metadump into two tests
This test examines the behavior of xfs_copy and xfs_metadump. Metadump now supports capturing external log contents, but copy does not. Split the test into two to improve coverage on multidevice filesystems. Signed-off-by: "Darrick J. Wong" <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Zorro Lang <zlang@kernel.org>
-rwxr-xr-xtests/xfs/50317
-rw-r--r--tests/xfs/503.out2
-rwxr-xr-xtests/xfs/60154
-rwxr-xr-xtests/xfs/601.out4
4 files changed, 61 insertions, 16 deletions
diff --git a/tests/xfs/503 b/tests/xfs/503
index 07d243bc06..01cff7b08d 100755
--- a/tests/xfs/503
+++ b/tests/xfs/503
@@ -4,11 +4,11 @@
#
# FS QA Test No. 503
#
-# Populate a XFS filesystem and ensure that metadump, mdrestore, and copy
-# all work properly.
+# Populate a XFS filesystem and ensure that metadump and mdrestore all work
+# properly.
#
. ./common/preamble
-_begin_fstest auto copy metadump
+_begin_fstest auto metadump
_register_cleanup "_cleanup" BUS
@@ -32,7 +32,6 @@ _supported_fs xfs
_require_command "$XFS_MDRESTORE_PROG" "xfs_mdrestore"
_require_loop
-_require_xfs_copy
_require_scratch_nocheck
_require_populate_commands
_xfs_skip_online_rebuild
@@ -58,16 +57,6 @@ _xfs_verify_metadumps '-o'
echo "metadump ao and mdrestore"
_xfs_verify_metadumps '-a -o'
-echo copy
-$XFS_COPY_PROG $SCRATCH_DEV $copy_file >> $seqres.full
-_check_scratch_fs $copy_file
-
-echo recopy
-$XFS_COPY_PROG $copy_file $SCRATCH_DEV >> $seqres.full
-_scratch_mount
-_check_scratch_fs
-_scratch_unmount
-
# success, all done
status=0
exit
diff --git a/tests/xfs/503.out b/tests/xfs/503.out
index 5e7488456d..7f3d3a5f24 100644
--- a/tests/xfs/503.out
+++ b/tests/xfs/503.out
@@ -4,5 +4,3 @@ metadump and mdrestore
metadump a and mdrestore
metadump o and mdrestore
metadump ao and mdrestore
-copy
-recopy
diff --git a/tests/xfs/601 b/tests/xfs/601
new file mode 100755
index 0000000000..e1e94ca8ff
--- /dev/null
+++ b/tests/xfs/601
@@ -0,0 +1,54 @@
+#! /bin/bash
+# SPDX-License-Identifier: GPL-2.0+
+# Copyright (c) 2019 Oracle, Inc. All Rights Reserved.
+#
+# FS QA Test No. 601
+#
+# Populate a XFS filesystem and ensure that xfs_copy works properly.
+#
+. ./common/preamble
+_begin_fstest auto copy
+
+_register_cleanup "_cleanup" BUS
+
+# Override the default cleanup function.
+_cleanup()
+{
+ cd /
+ rm -rf $tmp.* $testdir
+}
+
+# Import common functions.
+. ./common/filter
+. ./common/populate
+
+testdir=$TEST_DIR/test-$seq
+
+# real QA test starts here
+_supported_fs xfs
+
+_require_xfs_copy
+_require_scratch_nocheck
+_require_populate_commands
+_xfs_skip_online_rebuild
+_xfs_skip_offline_rebuild
+
+echo "Format and populate"
+_scratch_populate_cached nofill > $seqres.full 2>&1
+
+mkdir -p $testdir
+copy_file=$testdir/copy.img
+
+echo copy
+$XFS_COPY_PROG $SCRATCH_DEV $copy_file >> $seqres.full
+_check_scratch_fs $copy_file
+
+echo recopy
+$XFS_COPY_PROG $copy_file $SCRATCH_DEV >> $seqres.full
+_scratch_mount
+_check_scratch_fs
+_scratch_unmount
+
+# success, all done
+status=0
+exit
diff --git a/tests/xfs/601.out b/tests/xfs/601.out
new file mode 100755
index 0000000000..0cbe0c0d09
--- /dev/null
+++ b/tests/xfs/601.out
@@ -0,0 +1,4 @@
+QA output created by 601
+Format and populate
+copy
+recopy