generic/730: don't override $SCRATCH_DEV
PATCH 1/1 generic/730: don't override $SCRATCH_DEV
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.
--- tests/generic/730 | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-)
tests/generic/730 +7 -4
@@ -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
Signature · 1 line
2.53.0
Quoted 19 lines · Christoph Hellwig
generic/730 operates on a
scsi_debugdevice, but overridesSCRATCH_DEVto 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 thescsi_debugdevice don't get applied to it.Signed-off-by Christoph Hellwig <[email protected]>--- tests/generic/730 | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-)tests/generic/730 +0
-0@@ -25,14 +25,17 @@ _cleanup() _require_test _require_block_device $TEST_DEV _require_scsi_debug
tests/generic/730 _cleanup() · line 34
Quoted 10 lines
tests/generic/730 +7
-3-# 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,
--D
Quoted 12 lines
tests/generic/730 +0
-1size=$(_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_DEVSignature · 1 line
2.53.0