From: "Lukáš Czerner" <lczerner@redhat.com>
To: xfs-oss <xfs@oss.sgi.com>
Subject: [PATCH] xfstests: print missing utility name
Date: Wed, 12 Jun 2013 16:02:19 +0200 (CEST) [thread overview]
Message-ID: <alpine.LFD.2.00.1306121558030.14273@localhost.localdomain> (raw)
Currently when the utility such as fio or dmsetup is missing user does
not get the information about the utility name which is actually
missing. Fix it by providing second argument to the _require_command().
Signed-off-by: Lukas Czerner <lczerner@redhat.com>
---
common/rc | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/common/rc b/common/rc
index fe6bbfc..984cef1 100644
--- a/common/rc
+++ b/common/rc
@@ -1054,6 +1054,7 @@ _require_realtime()
_require_command()
{
[ -n "$1" ] && _cmd="$1" || _cmd="$2"
+ [ -z $_cmd ] && _cmd="<fill utility name>"
[ -n "$1" -a -x "$1" ] || _notrun "$_cmd utility required, skipped this test"
}
@@ -1061,7 +1062,7 @@ _require_command()
#
_require_dm_flakey()
{
- _require_command $DMSETUP_PROG
+ _require_command $DMSETUP_PROG dmsetup
modprobe dm-flakey >/dev/null 2>&1
$DMSETUP_PROG targets | grep flakey >/dev/null 2>&1
@@ -2036,7 +2037,7 @@ _require_fio()
{
job=$1
- _require_command $FIO_PROG
+ _require_command $FIO_PROG fio
if [ -z "$1" ]; then
return 1;
fi
--
1.8.2.1
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next reply other threads:[~2013-06-12 14:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-12 14:02 Lukáš Czerner [this message]
2013-06-13 2:53 ` [PATCH] xfstests: print missing utility name Dave Chinner
2013-06-14 14:08 ` Lukáš Czerner
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=alpine.LFD.2.00.1306121558030.14273@localhost.localdomain \
--to=lczerner@redhat.com \
--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