tests: Use proper word splitting when executing tests

Use the shell special variable "$@" instead of the inferior $* to
execute the test command in ts_valgrind.  The expansion of "$@" respects
proper word splitting and makes it possible to pass the command empty
arguments.  It might also prevent surprises with quoting in corner
cases.

Tested that `make check` passes.

Valgrind run with `make check TS_OPTS='--nonroot --memcheck'` passes.

Signed-off-by: Filipe Brandenburger <filbranden@google.com>
This commit is contained in:
Filipe Brandenburger 2016-08-10 13:17:12 -07:00
parent 47bd898e91
commit 88a5f90e87
1 changed files with 2 additions and 2 deletions

View File

@ -367,11 +367,11 @@ function ts_init_py {
function ts_valgrind {
if [ -z "$TS_VALGRIND_CMD" ]; then
$*
"$@"
else
$TS_VALGRIND_CMD --tool=memcheck --leak-check=full \
--leak-resolution=high --num-callers=20 \
--log-file="$TS_VGDUMP" $*
--log-file="$TS_VGDUMP" "$@"
fi
}