All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <djwong@kernel.org>
To: djwong@kernel.org, zlang@redhat.com
Cc: Christoph Hellwig <hch@lst.de>, Zorro Lang <zlang@kernel.org>,
	linux-xfs@vger.kernel.org, fstests@vger.kernel.org, guan@eryu.me
Subject: [PATCH 08/10] xfs/503: split copy and metadump into two tests
Date: Tue, 06 Feb 2024 18:19:19 -0800	[thread overview]
Message-ID: <170727235942.3726171.4745513175828645904.stgit@frogsfrogsfrogs> (raw)
In-Reply-To: <170727231361.3726171.14834727104549554832.stgit@frogsfrogsfrogs>

From: Darrick J. Wong <djwong@kernel.org>

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>
---
 tests/xfs/503     |   17 +++--------------
 tests/xfs/503.out |    2 --
 tests/xfs/601     |   54 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 tests/xfs/601.out |    4 ++++
 4 files changed, 61 insertions(+), 16 deletions(-)
 create mode 100755 tests/xfs/601
 create mode 100755 tests/xfs/601.out


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


  parent reply	other threads:[~2024-02-07  2:19 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-07  2:18 [PATCHSET] fstests: random fixes for v2024.01.14 Darrick J. Wong
2024-02-07  2:18 ` [PATCH 01/10] generic/256: constrain runtime with TIME_FACTOR Darrick J. Wong
2024-02-07  2:18 ` [PATCH 02/10] common/xfs: simplify maximum metadump format detection Darrick J. Wong
2024-02-07  2:18 ` [PATCH 03/10] common/populate: always metadump full metadata blocks Darrick J. Wong
2024-02-07  2:18 ` [PATCH 04/10] xfs/336: fix omitted -a and -o in metadump call Darrick J. Wong
2024-02-07  2:19 ` [PATCH 05/10] common: refactor metadump v1 and v2 tests, version 2 Darrick J. Wong
2024-02-07  9:15   ` Zorro Lang
2024-02-07  2:19 ` [PATCH 06/10] xfs/{129,234,253,605}: disable metadump v1 testing with external devices Darrick J. Wong
2024-02-07  2:19 ` [PATCH 07/10] xfs/503: test metadump obfuscation, not progressbars Darrick J. Wong
2024-02-07  2:19 ` Darrick J. Wong [this message]
2024-02-07  2:19 ` [PATCH 09/10] common/xfs: only pass -l in _xfs_mdrestore for v2 metadumps Darrick J. Wong
2024-02-07  2:19 ` [PATCH 10/10] xfs/122: fix for xfs_attr_shortform removal in 6.8 Darrick J. Wong
  -- strict thread matches above, loose matches on Subject: below --
2024-01-25 19:04 [PATCHSET] fstests: random fixes for v2024.01.14 Darrick J. Wong
2024-01-25 19:06 ` [PATCH 08/10] xfs/503: split copy and metadump into two tests Darrick J. Wong
2024-01-26 13:36   ` Christoph Hellwig
2024-01-26 16:45     ` Darrick J. Wong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=170727235942.3726171.4745513175828645904.stgit@frogsfrogsfrogs \
    --to=djwong@kernel.org \
    --cc=fstests@vger.kernel.org \
    --cc=guan@eryu.me \
    --cc=hch@lst.de \
    --cc=linux-xfs@vger.kernel.org \
    --cc=zlang@kernel.org \
    --cc=zlang@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.