* [PATCH] generic/730: don't override $SCRATCH_DEV
@ 2026-08-21 5:14 Christoph Hellwig
2026-08-21 23:39 ` Darrick J. Wong
0 siblings, 1 reply; 2+ messages in thread
From: Christoph Hellwig @ 2026-08-21 5:14 UTC (permalink / raw)
To: zlang, djwong; +Cc: linux-xfs, fstests
generic/730 operates on a scsi_debug device, but overrides SCRATCH_DEV
to test for shutdown support. Switch this to test the shutdown support
on the actual scratch device without overriding it, as shutdown support
should not depend on the actual device, and this ensures that options
that might not work on the scsi_debug device don't get applied to it.
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
tests/generic/730 | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/tests/generic/730 b/tests/generic/730
index 1798afb7deea..64d10bba73db 100755
--- a/tests/generic/730
+++ b/tests/generic/730
@@ -25,14 +25,17 @@ _cleanup()
_require_test
_require_block_device $TEST_DEV
_require_scsi_debug
-# scsi_debug doesn't support DAX, so skip this test if MOUNT_OPTIONS
-# contains "dax"
-_exclude_scratch_mount_option "dax"
+
+# The actual test does not use the scratch device, but _require_scratch_shutdown
+# is the most sensible way to check that a file system supports shutdown.
+# Require scratch to use that check, but otherwise just use the scsi_debug
+# device.
+_require_scratch_nocheck
+_require_scratch_shutdown
size=$(_small_fs_size_mb 256)
SCSI_DEBUG_DEV=`_get_scsi_debug_dev 512 512 0 $size`
test -b "$SCSI_DEBUG_DEV" || _notrun "Failed to initialize scsi debug device"
-SCRATCH_DEV=$SCSI_DEBUG_DEV _require_scratch_shutdown
echo "SCSI debug device $SCSI_DEBUG_DEV" >>$seqres.full
run_check _mkfs_dev $SCSI_DEBUG_DEV
--
2.53.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] generic/730: don't override $SCRATCH_DEV
2026-08-21 5:14 [PATCH] generic/730: don't override $SCRATCH_DEV Christoph Hellwig
@ 2026-08-21 23:39 ` Darrick J. Wong
0 siblings, 0 replies; 2+ messages in thread
From: Darrick J. Wong @ 2026-08-21 23:39 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: zlang, linux-xfs, fstests
On Fri, Aug 21, 2026 at 07:14:35AM +0200, Christoph Hellwig wrote:
> generic/730 operates on a scsi_debug device, but overrides SCRATCH_DEV
> to test for shutdown support. Switch this to test the shutdown support
> on the actual scratch device without overriding it, as shutdown support
> should not depend on the actual device, and this ensures that options
> that might not work on the scsi_debug device don't get applied to it.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
> tests/generic/730 | 11 +++++++----
> 1 file changed, 7 insertions(+), 4 deletions(-)
>
> diff --git a/tests/generic/730 b/tests/generic/730
> index 1798afb7deea..64d10bba73db 100755
> --- a/tests/generic/730
> +++ b/tests/generic/730
> @@ -25,14 +25,17 @@ _cleanup()
> _require_test
> _require_block_device $TEST_DEV
> _require_scsi_debug
> -# scsi_debug doesn't support DAX, so skip this test if MOUNT_OPTIONS
> -# contains "dax"
> -_exclude_scratch_mount_option "dax"
> +
> +# The actual test does not use the scratch device, but _require_scratch_shutdown
> +# is the most sensible way to check that a file system supports shutdown.
> +# Require scratch to use that check, but otherwise just use the scsi_debug
> +# device.
> +_require_scratch_nocheck
> +_require_scratch_shutdown
Makes sense,
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>
--D
>
> size=$(_small_fs_size_mb 256)
> SCSI_DEBUG_DEV=`_get_scsi_debug_dev 512 512 0 $size`
> test -b "$SCSI_DEBUG_DEV" || _notrun "Failed to initialize scsi debug device"
> -SCRATCH_DEV=$SCSI_DEBUG_DEV _require_scratch_shutdown
> echo "SCSI debug device $SCSI_DEBUG_DEV" >>$seqres.full
>
> run_check _mkfs_dev $SCSI_DEBUG_DEV
> --
> 2.53.0
>
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-08-21 23:39 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-21 5:14 [PATCH] generic/730: don't override $SCRATCH_DEV Christoph Hellwig
2026-08-21 23:39 ` Darrick J. Wong
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox