All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xfs/432: fix this test when external devices are in use
@ 2022-07-26 19:51 Darrick J. Wong
  2022-07-27 12:21 ` Zorro Lang
  2022-07-27 22:06 ` [PATCH] xfs/432: fix this test when external devices are in use Dave Chinner
  0 siblings, 2 replies; 8+ messages in thread
From: Darrick J. Wong @ 2022-07-26 19:51 UTC (permalink / raw)
  To: guaneryu, zlang; +Cc: linux-xfs, fstests, guan

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

This program exercises metadump and mdrestore being run against the
scratch device.  Therefore, the test must pass external log / rt device
arguments to xfs_repair -n to check the "restored" filesystem.  Fix the
incorrect usage, and report repair failures, since this test has been
silently failing for a while now.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
---
 tests/xfs/432 |   11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/tests/xfs/432 b/tests/xfs/432
index 86012f0b..5c6744ce 100755
--- a/tests/xfs/432
+++ b/tests/xfs/432
@@ -89,7 +89,16 @@ _scratch_xfs_metadump $metadump_file -w
 xfs_mdrestore $metadump_file $metadump_img
 
 echo "Check restored metadump image"
-$XFS_REPAIR_PROG -n $metadump_img >> $seqres.full 2>&1
+repair_args=('-n')
+[ "$USE_EXTERNAL" = yes -a ! -z "$SCRATCH_LOGDEV" ] && \
+	repair_args+=('-l' "$SCRATCH_LOGDEV")
+
+[ "$USE_EXTERNAL" = yes -a ! -z "$SCRATCH_RTDEV" ] && \
+	repair_args+=('-r' "$SCRATCH_RTDEV")
+
+$XFS_REPAIR_PROG "${repair_args[@]}" $metadump_img >> $seqres.full 2>&1
+res=$?
+test $res -ne 0 && echo "xfs_repair on restored fs returned $res?"
 
 # success, all done
 status=0

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-07-27 23:15 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-26 19:51 [PATCH] xfs/432: fix this test when external devices are in use Darrick J. Wong
2022-07-27 12:21 ` Zorro Lang
2022-07-27 14:59   ` Darrick J. Wong
2022-07-27 17:21     ` Zorro Lang
2022-07-27 23:14       ` [PATCH] xfs/432: fix this test when external devices are in useOM Darrick J. Wong
2022-07-27 22:06 ` [PATCH] xfs/432: fix this test when external devices are in use Dave Chinner
2022-07-27 22:47   ` Darrick J. Wong
2022-07-27 23:15     ` Darrick J. Wong

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.