Re: [PATCH] generic/730: don't override $SCRATCH_DEV

"Darrick J. Wong" <[email protected]>
Newsgroups org.kernel.vger.linux-xfs,org.kernel.vger.fstests
Message-ID <20260821233902.GI839663@frogsfrogsfrogs>
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 <[email protected]>
> ---
>  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" <[email protected]>

--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
> 
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.