|
From: Petar J. <mip...@gm...> - 2016-02-03 19:52:12
|
Hi Mark, On Thu, Jan 21, 2016 at 12:15 AM, <sv...@va...> wrote: > Author: mjw > Date: Wed Jan 20 23:15:04 2016 > New Revision: 15765 > > Log: > Use command -v instead of which in res_search.vgtest prereq. > > "command -v" is a (POSIX) shell builtin that should work everywhere. > "which" might be an external command that might not be installed in > which case the shell might just error out. > This will not work on systems that do not have 'host' installed, as vg_regtest script uses '/bin/sh -c' to execute the command, so it will return error code 127 and stop the testing. E.g. if I rename "host" to "host123" and try it out: $ /bin/sh -c which host123 && host123 $ echo $? 1 $ /bin/sh -c command -v host123 && host123 host123: command not found $ echo $? 127 Regards, Petar > Modified: > trunk/none/tests/res_search.vgtest > > Modified: trunk/none/tests/res_search.vgtest > > ============================================================================== > --- trunk/none/tests/res_search.vgtest (original) > +++ trunk/none/tests/res_search.vgtest Wed Jan 20 23:15:04 2016 > @@ -1,4 +1,4 @@ > -prereq: which host >/dev/null 2>/dev/null && host www.yahoo.com > > /dev/null && ! ../../tests/os_test darwin > +prereq: command -v host >/dev/null 2>/dev/null && host www.yahoo.com > > /dev/null && ! ../../tests/os_test darwin > prog: res_search > args: www.yahoo.com > vgopts: -q > > > > ------------------------------------------------------------------------------ > Site24x7 APM Insight: Get Deep Visibility into Application Performance > APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month > Monitor end-to-end web transactions and take corrective actions now > Troubleshoot faster and improve end-user experience. Signup Now! > http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140 > _______________________________________________ > Valgrind-developers mailing list > Val...@li... > https://lists.sourceforge.net/lists/listinfo/valgrind-developers > |