aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@kernel.org>2023-10-25 20:12:02 -0700
committerZorro Lang <zlang@kernel.org>2023-10-27 20:13:36 +0800
commit949b7ac96e5600e2686cc291e91d91ef74cb8341 (patch)
tree8be721b99addaa490a0fd7d65c589d483bb0d029
parent6409d61958c58825b863dda6e1fc709b44206ce0 (diff)
downloadxfstests-dev-949b7ac96e5600e2686cc291e91d91ef74cb8341.tar.gz
generic/251: don't snapshot $here during a test
Zorro complained that the next patch caused him a regression: generic/251 249s ... [failed, exit status 1]- output mismatch (see /root/git/xfstests/results//generic/251.out.bad) --- tests/generic/251.out 2022-04-29 23:07:23.263498297 +0800 +++ /root/git/xfstests/results//generic/251.out.bad 2023-10-22 14:17:07.248059405 +0800 @@ -1,2 +1,5 @@ QA output created by 251 Running the test: done. +5838a5839 +> aa60581221897d3d7dd60458e1cca2fa ./results/generic/251.full +!!!Checksums has changed - Filesystem possibly corrupted!!!\n ... (Run 'diff -u /root/git/xfstests/tests/generic/251.out /root/git/xfstests/results//generic/251.out.bad' to see the entire diff) Ran: generic/251 Failures: generic/251 Failed 1 of 1 tests The next patch writes some debugging information into $seqres.full, which is a file underneat $RESULT_BASE. If the test operator does not set RESULT_BASE, it will be set to a subdir of $here by default. Since this test also snapshots the contents of $here before starting its loop, any logging to $seqres.full on such a system will cause the post-copy checksum to fail due to a mismatch. Fix all this by copying $here to $SCRATCH_DEV and checksumming the copy before the FITRIM stress test begins to avoid problems with $seqres.full. Signed-off-by: "Darrick J. Wong" <djwong@kernel.org> Reviewed-by: Zorro Lang <zlang@redhat.com> Signed-off-by: Zorro Lang <zlang@kernel.org>
-rwxr-xr-xtests/generic/2518
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/generic/251 b/tests/generic/251
index 8ee74980cc..3b807df5fa 100755
--- a/tests/generic/251
+++ b/tests/generic/251
@@ -130,7 +130,13 @@ function run_process() {
}
nproc=20
-content=$here
+
+# Copy $here to the scratch fs and make coipes of the replica. The fstests
+# output (and hence $seqres.full) could be in $here, so we need to snapshot
+# $here before computing file checksums.
+content=$SCRATCH_MNT/orig
+mkdir -p $content
+cp -axT $here/ $content/
mkdir -p $tmp