]> git-server-git.apps.pok.os.sepia.ceph.com Git - xfstests-dev.git/commitdiff
xfs/185: don't use SCRATCH_{,RT}DEV helpers
authorChristoph Hellwig <hch@lst.de>
Thu, 18 Dec 2025 07:30:05 +0000 (08:30 +0100)
committerZorro Lang <zlang@kernel.org>
Wed, 31 Dec 2025 21:02:23 +0000 (05:02 +0800)
This tests creates loop-based data and rt devices for testing.  Don't
override SCRATCH_{,RT}DEV and don't use the helpers based on it because
the options specified in MKFS_OPTIONS might not work for this
configuration.  This also means that we will now never use a log device
for this test even if SCRATCH_LOGDEV was set, which is fine because the
log device is not relevant for what is tested.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Zorro Lang <zlang@kernel.org>
tests/xfs/185

index 7aceb383ce4609d36cbcd4e79ae518c5a84ffa7a..84139be8e66e0048d0be3ed63f95e3e6c6570b79 100755 (executable)
@@ -22,12 +22,11 @@ _cleanup()
 {
        cd /
        rm -r -f $tmp.*
-       _scratch_unmount
+       umount $SCRATCH_MNT
        test -n "$ddloop" && _destroy_loop_device "$ddloop"
        test -n "$rtloop" && _destroy_loop_device "$rtloop"
        test -n "$ddfile" && rm -f "$ddfile"
        test -n "$rtfile" && rm -f "$rtfile"
-       test -n "$old_use_external" && USE_EXTERNAL="$old_use_external"
 }
 
 _require_test
@@ -64,16 +63,8 @@ rtminor=$(stat -c '%T' "$rtloop")
 test $ddmajor -le $rtmajor || \
        _notrun "Data loopdev minor $ddminor larger than rt minor $rtminor"
 
-# Inject our custom-built devices as an rt-capable scratch device.
-# We avoid touching "require_scratch" so that post-test fsck will not try to
-# run on our synthesized scratch device.
-old_use_external="$USE_EXTERNAL"
-USE_EXTERNAL=yes
-SCRATCH_RTDEV="$rtloop"
-SCRATCH_DEV="$ddloop"
-
-_scratch_mkfs >> $seqres.full
-_try_scratch_mount >> $seqres.full || \
+$MKFS_XFS_PROG -r rtdev=$rtloop $ddloop  >> $seqres.full
+mount -o rtdev=$rtloop $ddloop $SCRATCH_MNT >> $seqres.full || \
        _notrun "mount with injected rt device failed"
 
 # Create a file that we'll use to seed fsmap entries for the rt device,