]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commitdiff
shared/032: handle mkfs.* in either /sbin or /usr/sbin
authorEric Sandeen <sandeen@sandeen.net>
Thu, 12 Feb 2015 03:11:04 +0000 (14:11 +1100)
committerDave Chinner <david@fromorbit.com>
Thu, 12 Feb 2015 03:11:04 +0000 (14:11 +1100)
mkfs executables may live in either /sbin or /usr/sbin, and
the current regexp in this test only catches the former,
and so the test won't run properly with the latter.

Fix this by filtering out whatever was found as
${MKFS_PROG}, rather than a hard-coded /sbin/mkfs path.

Because the list was generated by using a wildcard
with ${MKFS_PROG}.* this will always be the correct filter.

Reported-by: Boaz Harrosh <boaz@plexistor.com>
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
tests/shared/032

index a410003068e4e223a70fdb55ef9b9423b28ad43c..3b06382664e875ef83c0db2aa9d9125cbad4cf32 100755 (executable)
@@ -50,7 +50,7 @@ if [ "$FSTYP" == "btrfs" ]; then
 fi
 
 echo "Silence is golden."
-for fs in `echo ${MKFS_PROG}.* | sed -e 's/.sbin.mkfs.//g'`
+for fs in `echo ${MKFS_PROG}.* | sed -e "s:${MKFS_PROG}.::g"`
 do
        preop=""        # for special input needs
        preargs=""      # for any special pre-device options