From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Sandeen Subject: [PATCH V2] fstests: shared/032 handle mkfs.* in either /sbin or /usr/sbin Date: Wed, 11 Feb 2015 11:36:50 -0600 Message-ID: <54DB9332.5010606@sandeen.net> References: <54DB35F0.1010203@plexistor.com> <54DB8D2D.20104@sandeen.net> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit To: Boaz Harrosh , Dave Chinner , xfs@oss.sgi.com, linux-fsdevel , fstests@vger.kernel.org Return-path: In-Reply-To: <54DB8D2D.20104@sandeen.net> Sender: fstests-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org 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 Signed-off-by: Eric Sandeen --- 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