tests: fix shellcheck warnings in cli/convert/test_auto_source_discovery_{log_level...
authorSimon Marchi <simon.marchi@efficios.com>
Tue, 25 Feb 2020 20:08:24 +0000 (15:08 -0500)
committerSimon Marchi <simon.marchi@efficios.com>
Wed, 26 Feb 2020 14:10:00 +0000 (09:10 -0500)
commite511a2649d504f1e535cefa9b579f1cee2efc92c
tree3da516a32a86bc22f93d84a0665519266a5568fc
parenteb70e47f62f88dc76cae72977f8b2b851e2ec4dd
tests: fix shellcheck warnings in cli/convert/test_auto_source_discovery_{log_level,params}

shellcheck complains:

    In test_auto_source_discovery_params line 42:
    print_test_params="--params what=\"test-params\""
                       ^---------------------------^ SC2089: Quotes/backslashes will be treated literally. Use an array.

    In test_auto_source_discovery_params line 68:
     "${dir_ab}" --params 'test-allo="madame"' ${print_test_params} \
                                                      ^------------------^ SC2090: Quotes/backslashes in this variable will not be respected.
                                                      ^------------------^ SC2086: Double quote to prevent globbing and word splitting.

    Did you mean:
     "${dir_ab}" --params 'test-allo="madame"' "${print_test_params}" \

It would be cleaner to make it print_test_params an array, like we do
for details_sink.

Consistently double-quotes references to print_test_params and
details_sink to avoid the "word splitting" warnings.

Change-Id: I6b18effc29f3c453949b4c181e528e2a60cea4e4
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Reported-by: shellcheck
Reviewed-on: https://review.lttng.org/c/babeltrace/+/3145
Tested-by: jenkins <jenkins@lttng.org>
tests/cli/convert/test_auto_source_discovery_log_level
tests/cli/convert/test_auto_source_discovery_params
This page took 0.024672 seconds and 4 git commands to generate.