From: Fam Zheng <famz@redhat.com>
To: qemu-devel@nongnu.org
Cc: qemu-trivial@nongnu.org, kwolf@redhat.com, mjt@tls.msk.ru,
stefanha@redhat.com, mreitz@redhat.com
Subject: [Qemu-devel] [PATCH] qemu-iotests: Fix error message if which(1) not installed
Date: Tue, 18 Nov 2014 10:49:46 +0800 [thread overview]
Message-ID: <1416278986-17320-1-git-send-email-famz@redhat.com> (raw)
When which(1) is not installed, we complain "perl not found" because
it's the first set_prog_path check. The error message is misleading.
Fix it by adding a check for which(1) in the beginning.
Signed-off-by: Fam Zheng <famz@redhat.com>
---
tests/qemu-iotests/common.config | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tests/qemu-iotests/common.config b/tests/qemu-iotests/common.config
index bd6790b..9674f3a 100644
--- a/tests/qemu-iotests/common.config
+++ b/tests/qemu-iotests/common.config
@@ -73,6 +73,8 @@ _fatal()
exit 1
}
+which -v &>/dev/null || _fatal "which not found"
+
export PERL_PROG="`set_prog_path perl`"
[ "$PERL_PROG" = "" ] && _fatal "perl not found"
--
1.9.3
next reply other threads:[~2014-11-18 2:49 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-18 2:49 Fam Zheng [this message]
2014-11-18 4:40 ` [Qemu-devel] [PATCH] qemu-iotests: Fix error message if which(1) not installed Eric Blake
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=1416278986-17320-1-git-send-email-famz@redhat.com \
--to=famz@redhat.com \
--cc=kwolf@redhat.com \
--cc=mjt@tls.msk.ru \
--cc=mreitz@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@nongnu.org \
--cc=stefanha@redhat.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).