diff mbox

xfs/279: filter scsi debug device correctly

Message ID 1473053427-15498-1-git-send-email-eguan@redhat.com (mailing list archive)
State Accepted
Headers show

Commit Message

Eryu Guan Sept. 5, 2016, 5:30 a.m. UTC
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.

Signed-off-by: Eryu Guan <eguan@redhat.com>
---
 tests/xfs/279 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Dave Chinner Sept. 7, 2016, 10:47 p.m. UTC | #1
On Mon, Sep 05, 2016 at 01:30:27PM +0800, Eryu Guan wrote:
> 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).

> So use $SCSI_DEBUG_DEV to match the correct scsi debug device name.
> 
> Signed-off-by: Eryu Guan <eguan@redhat.com>

Reviewed-by: Dave Chinner <dchinner@redhat.com>
diff mbox

Patch

diff --git a/tests/xfs/279 b/tests/xfs/279
index cde7d21..9dee4cf 100755
--- a/tests/xfs/279
+++ b/tests/xfs/279
@@ -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."