From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59045) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XqYrI-00088C-8x for qemu-devel@nongnu.org; Mon, 17 Nov 2014 21:49:42 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XqYrC-0007gn-36 for qemu-devel@nongnu.org; Mon, 17 Nov 2014 21:49:36 -0500 From: Fam Zheng Date: Tue, 18 Nov 2014 10:49:46 +0800 Message-Id: <1416278986-17320-1-git-send-email-famz@redhat.com> Subject: [Qemu-devel] [PATCH] qemu-iotests: Fix error message if which(1) not installed List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: qemu-trivial@nongnu.org, kwolf@redhat.com, mjt@tls.msk.ru, stefanha@redhat.com, mreitz@redhat.com 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 --- 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