summaryrefslogtreecommitdiffstats
path: root/tests/functions.sh
diff options
context:
space:
mode:
authorFilipe Brandenburger2016-08-10 22:17:12 +0200
committerFilipe Brandenburger2016-08-10 22:37:43 +0200
commit88a5f90e874cac53f5d24aed6542d4867be10e2d (patch)
treed7cbfbea01890ca0ba1c32e8ae904dabe46221bc /tests/functions.sh
parenttaskset: clarify that masks are always hex in man page (diff)
downloadkernel-qcow2-util-linux-88a5f90e874cac53f5d24aed6542d4867be10e2d.tar.gz
kernel-qcow2-util-linux-88a5f90e874cac53f5d24aed6542d4867be10e2d.tar.xz
kernel-qcow2-util-linux-88a5f90e874cac53f5d24aed6542d4867be10e2d.zip
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>
Diffstat (limited to 'tests/functions.sh')
-rw-r--r--tests/functions.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/functions.sh b/tests/functions.sh
index b9a852365..609cedffd 100644
--- a/tests/functions.sh
+++ b/tests/functions.sh
@@ -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
}