xfs
[Top] [All Lists]

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

To: Boaz Harrosh <boaz@xxxxxxxxxxxxx>, Dave Chinner <david@xxxxxxxxxxxxx>, xfs@xxxxxxxxxxx, linux-fsdevel <linux-fsdevel@xxxxxxxxxxxxxxx>, fstests@xxxxxxxxxxxxxxx
Subject: [PATCH V2] fstests: shared/032 handle mkfs.* in either /sbin or /usr/sbin
From: Eric Sandeen <sandeen@xxxxxxxxxxx>
Date: Wed, 11 Feb 2015 11:36:50 -0600
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <54DB8D2D.20104@xxxxxxxxxxx>
References: <54DB35F0.1010203@xxxxxxxxxxxxx> <54DB8D2D.20104@xxxxxxxxxxx>
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@xxxxxxxxxxxxx>
Signed-off-by: Eric Sandeen <sandeen@xxxxxxxxxx>
---

V2: KISS

diff --git a/tests/shared/032 b/tests/shared/032
index a410003..3b06382 100755
--- a/tests/shared/032
+++ b/tests/shared/032
@@ -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


<Prev in Thread] Current Thread [Next in Thread>