[PATCH] cramfs-mkfs test looks for non-existing /dev/loop/X

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The cramfs-mkfs test fails because it searches for "/dev/loop/X",
but /proc/mounts may contain "/dev/loopX" instead.

This patch adds a check for both forms (either /dev/loop/X or /dev/loopX)

Signed-off-by: Roy Peled <the.roy.peled@xxxxxxxxx>

---
diff -urNp util-linux-ng-2.14.1.org/tests/ts-cramfs-mkfs util-linux-ng-2.14.1/tests/ts-cramfs-mkfs
--- util-linux-ng-2.14.1.org/tests/ts-cramfs-mkfs	2008-08-14 14:26:42.000000000 +0300
+++ util-linux-ng-2.14.1/tests/ts-cramfs-mkfs	2009-02-01 13:18:38.000000000 +0200
@@ -74,7 +74,7 @@ ts_log "mount the image"
 $TS_CMD_MOUNT -L $LABEL $TS_MOUNTPOINT 2>&1 >> $TS_OUTPUT
 
 # check it
-grep -q $DEVICE /proc/mounts
+grep -q $DEVICE /proc/mounts || grep -q $(echo $DEVICE | sed 's#/\([0-9]*\)$#\1#') /proc/mounts
 [ "$?" == "0" ] || ts_die "Cannot found $DEVICE in /proc/mounts" $DEVICE
 
 ts_log "list the image"
--
To unsubscribe from this list: send the line "unsubscribe util-linux-ng" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux