generic/108: skip test if we can't initialize scsi_debug
authorDarrick J. Wong <darrick.wong@oracle.com>
Thu, 16 Jan 2020 05:11:13 +0000 (21:11 -0800)
committerEryu Guan <guaneryu@gmail.com>
Sun, 2 Feb 2020 13:17:29 +0000 (21:17 +0800)
Correct the logic in this test that detects failed scsi_debug
initializations.  Downgrade the reaction to _notrun since the filesystem
under test did not fail, just our mockup disk.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
tests/generic/108

index 9b4fe60f34fb48ad193ccad53a4febfdbf6e59fb..ab6101f25f65b2e7b79609ba22cc3c380169782e 100755 (executable)
@@ -49,9 +49,7 @@ rm -f $seqres.full
 
 # _get_scsi_debug_dev returns a scsi debug device with 128M in size by default
 SCSI_DEBUG_DEV=`_get_scsi_debug_dev 512 512 0 300`
-if [ "$SCSI_DEBUG_DEV" == "/dev/" ]; then
-       _fail "Failed to initialize scsi debug device"
-fi
+test -b "$SCSI_DEBUG_DEV" || _notrun "Failed to initialize scsi debug device"
 echo "SCSI debug device $SCSI_DEBUG_DEV" >>$seqres.full
 
 # create striped volume with 4MB stripe size