Skip to contentSkip to conversation

xfs/279: filter scsi debug device correctly

PATCH In review Eryu Guan 2 participants 2 messages Sep 5, 2016 – Sep 7, 2016

lore
Share & tools
lore

Eryu Guan

author
#0 lore raw

PATCH 1/1 xfs/279: filter scsi debug device correctly

This test assumes scsi debug device is "/dev/sd." when doing the filter, but that isn't always true, I've seen failure like

-mkfs with opts: DEVICE
+mkfs with opts: DEVICEl

So use $SCSI_DEBUG_DEV to match the correct scsi debug device name.

---
 tests/xfs/279 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tests/xfs/279 +1 -1
index cde7d21..9dee4cf 100755
@@ -61,7 +61,7 @@ _wipe_device()
 _check_mkfs()
 {
 	echo "===================" 
-	echo "mkfs with opts: $@" | sed -e "s,/dev/sd.,DEVICE,"
+	echo "mkfs with opts: $@" | sed -e "s,$SCSI_DEBUG_DEV,DEVICE,"
 	$MKFS_XFS_PROG $@ 2>/dev/null > $tmp.mkfs.full
 	if [ $? -ne 0 ]; then
 		echo "Failed."
Signature · 1 line
2.7.4
Reviewed-by on v1 1/1
#1 lore raw
Quoted 5 lines · Eryu Guan

This test assumes scsi debug device is "/dev/sd." when doing the filter, but that isn't always true, I've seen failure like

-mkfs with opts: DEVICE
+mkfs with opts: DEVICEl

Yeah, I can see how that would occur when you have enough scsi devices to go to multiple device characters (e.g. /dev/sdal).

Quoted 3 lines

So use $SCSI_DEBUG_DEV to match the correct scsi debug device name.

Signature · 2 lines
Dave Chinner
[email protected]