[PATCH] fstests: shared/032 handle mkfs.* in either /sbin or /usr/sbin

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

 



mkfs programs may live in either /sbin or /usr/sbin, and
the current regexp in this test only catches the latter,
and so the test wont' run properly for the former.

Fix this by iterating over each full path to every mkfs.${FS}
program in ${MKFS.PROG}.*, and extracting the ${FS} part.

We found the paths in the first place by using a wildcard
with the found ${MKFS_PROG}, so we can use that string to
filter out everything except the wildcard match at the end,
which is the fs name we are looking for.

Reported-by: Boaz Harrosh <boaz@xxxxxxxxxxxxx>
Signed-off-by: Eric Sandeen <sandeen@xxxxxxxxxx>
---

diff --git a/tests/shared/032 b/tests/shared/032
index a410003..8ffb54b 100755
--- a/tests/shared/032
+++ b/tests/shared/032
@@ -50,8 +50,9 @@ if [ "$FSTYP" == "btrfs" ]; then
 fi
 
 echo "Silence is golden."
-for fs in `echo ${MKFS_PROG}.* | sed -e 's/.sbin.mkfs.//g'`
+for mkfs in `echo ${MKFS_PROG}.*`
 do
+	fs=`echo $mkfs | sed -e s:${MKFS_PROG}.::`
 	preop=""	# for special input needs
 	preargs=""	# for any special pre-device options
 	postargs=""	# for any special post-device options


--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux