diff mbox series

[6/9] misc: replace more open-coded _scratch_xfs_db calls

Message ID 161836230786.2754991.7641118311374470635.stgit@magnolia (mailing list archive)
State New, archived
Headers show
Series fstests: random fixes | expand

Commit Message

Darrick J. Wong April 14, 2021, 1:05 a.m. UTC
From: Darrick J. Wong <djwong@kernel.org>

Replace the last remaining open-coded calls to xfs_db for the scratch
device with calls to _scratch_xfs_db.  This fixes these tests when
external logs are enabled.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
---
 common/repair |    2 +-
 tests/xfs/030 |    2 +-
 tests/xfs/083 |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

Comments

Christoph Hellwig April 14, 2021, 6:18 a.m. UTC | #1
On Tue, Apr 13, 2021 at 06:05:07PM -0700, Darrick J. Wong wrote:
> From: Darrick J. Wong <djwong@kernel.org>
> 
> Replace the last remaining open-coded calls to xfs_db for the scratch
> device with calls to _scratch_xfs_db.  This fixes these tests when
> external logs are enabled.
> 
> Signed-off-by: Darrick J. Wong <djwong@kernel.org>

Looks good,

Reviewed-by: Christoph Hellwig <hch@lst.de>
diff mbox series

Patch

diff --git a/common/repair b/common/repair
index 8adc2178..5a957f4e 100644
--- a/common/repair
+++ b/common/repair
@@ -10,7 +10,7 @@  _zero_position()
 	struct="$2"
 
 	# set values for off/len variables provided by db
-	eval `xfs_db -r -c "$struct" -c stack $SCRATCH_DEV | perl -ne '
+	eval `_scratch_xfs_db -r -c "$struct" -c stack | perl -ne '
 		if (/byte offset (\d+), length (\d+)/) {
 			print "offset=$1\nlength=$2\n"; exit
 		}'`
diff --git a/tests/xfs/030 b/tests/xfs/030
index 906d9019..81198155 100755
--- a/tests/xfs/030
+++ b/tests/xfs/030
@@ -81,7 +81,7 @@  else
 	_scratch_unmount
 fi
 clear=""
-eval `xfs_db -r -c "sb 1" -c stack $SCRATCH_DEV | perl -ne '
+eval `_scratch_xfs_db -r -c "sb 1" -c stack | perl -ne '
 	if (/byte offset (\d+), length (\d+)/) {
 		print "clear=", $1 / 512, "\n"; exit
 	}'`
diff --git a/tests/xfs/083 b/tests/xfs/083
index a548be2a..a3f32cb7 100755
--- a/tests/xfs/083
+++ b/tests/xfs/083
@@ -108,7 +108,7 @@  echo "+ check fs" >> $seqres.full
 _scratch_xfs_repair >> $seqres.full 2>&1 || _fail "should pass initial fsck"
 
 echo "++ corrupt image" >> $seqres.full
-xfs_db -x -c blockget -c "blocktrash ${FUZZ_ARGS}" "${SCRATCH_DEV}" >> $seqres.full 2>&1
+_scratch_xfs_db -x -c blockget -c "blocktrash ${FUZZ_ARGS}" >> $seqres.full 2>&1
 
 echo "++ mount image" >> $seqres.full
 _try_scratch_mount >> $seqres.full 2>&1