linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Sandeen <sandeen@sandeen.net>
To: Boaz Harrosh <boaz@plexistor.com>,
	Dave Chinner <david@fromorbit.com>,
	xfs@oss.sgi.com, linux-fsdevel <linux-fsdevel@vger.kernel.org>,
	fstests@vger.kernel.org
Subject: [PATCH] fstests: shared/032 handle mkfs.* in either /sbin or /usr/sbin
Date: Wed, 11 Feb 2015 11:11:09 -0600	[thread overview]
Message-ID: <54DB8D2D.20104@sandeen.net> (raw)
In-Reply-To: <54DB35F0.1010203@plexistor.com>

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@plexistor.com>
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---

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



  parent reply	other threads:[~2015-02-11 17:11 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-11 10:58 shared/032 is broken on Fedora Boaz Harrosh
2015-02-11 13:10 ` Boaz Harrosh
2015-02-11 16:50 ` Eric Sandeen
2015-02-11 16:55   ` Eric Sandeen
2015-02-11 17:23   ` Lukáš Czerner
2015-02-11 17:11 ` Eric Sandeen [this message]
2015-02-11 17:36   ` [PATCH V2] fstests: shared/032 handle mkfs.* in either /sbin or /usr/sbin Eric Sandeen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54DB8D2D.20104@sandeen.net \
    --to=sandeen@sandeen.net \
    --cc=boaz@plexistor.com \
    --cc=david@fromorbit.com \
    --cc=fstests@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=xfs@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).