tests: fix shellcheck warning in plugins/src.ctf.lttng-live/test_live
shellcheck says:
In test_live line 143:
if ! "$BT_TESTS_BT2_BIN" $cli_args 1>"$cli_stdout_file" 2>"$cli_stderr_file"; then
^-------^ SC2086: Double quote to prevent globbing and word splitting.
Did you mean:
if ! "$BT_TESTS_BT2_BIN" "$cli_args" 1>"$cli_stdout_file" 2>"$cli_stderr_file"; then
In this case, we do want to pass the $cli_args string as multiple
arguments, so we don't want to just double-quote it. Circumvent the
warning by splitting it explicitly into an array, then passing the array
using array expansion. I think this is clearer anyway, as it shows the
intent of splitting the arguments more explicitly than relying in the
implicit splitting done by the shell.
Also, change it to use bt_cli, instead of running the babeltrace binary
by hand.
Change-Id: Idd277fc792e9a426213932566c3c096a53b56d9e
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/3140
Tested-by: jenkins <jenkins@lttng.org>
This page took 0.024267 seconds and 4 git commands to generate.