From: Mark Wielaard Date: Thu, 4 Feb 2016 22:38:06 +0000 (+0000) Subject: Explicitly test command -v host output before trying host command. X-Git-Tag: svn/VALGRIND_3_12_0~242 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=11e3a4824db40c48121c4fd9e68a1b42c4162c3d;p=thirdparty%2Fvalgrind.git Explicitly test command -v host output before trying host command. We have to explicitly test command -v host worked otherwise on systems that do not have 'host' installed will return error code 127 and stop testing. This is because vg_regtest uses '/bin/sh -c' to execute the prereq command. Found by Petar Jovanovic. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15781 --- diff --git a/none/tests/res_search.vgtest b/none/tests/res_search.vgtest index 3a03261264..2a32cf3b7f 100644 --- a/none/tests/res_search.vgtest +++ b/none/tests/res_search.vgtest @@ -1,4 +1,4 @@ -prereq: command -v host >/dev/null 2>/dev/null && host www.yahoo.com > /dev/null && ! ../../tests/os_test darwin +prereq: test $(command -v host) && host www.yahoo.com > /dev/null && ! ../../tests/os_test darwin prog: res_search args: www.yahoo.com vgopts: -q