Fix: tests: quote variable in case it's not set
[lttng-tools.git] / tests / utils / utils.sh
index b0a64ff94f936c2bcfa82b64dbbada2032462cc0..3ad9abe33db4ade3f20f03ebe3fffd68d2f9cac5 100644 (file)
@@ -1427,8 +1427,9 @@ function lttng_snapshot_del_output_fail ()
 function lttng_snapshot_record ()
 {
        local sess_name=$1
+       local trace_path=$2
 
-       $TESTDIR/../src/bin/lttng/$LTTNG_BIN snapshot record -s $sess_name $trace_path 1> $OUTPUT_DEST 2> $ERROR_OUTPUT_DEST
+       $TESTDIR/../src/bin/lttng/$LTTNG_BIN snapshot record -s "$sess_name" "$trace_path" 1> $OUTPUT_DEST 2> $ERROR_OUTPUT_DEST
        ok $? "Snapshot recorded"
 }
 
@@ -1977,7 +1978,7 @@ function rotate_session_fail ()
 
 function destructive_tests_enabled ()
 {
-       if [ ${LTTNG_ENABLE_DESTRUCTIVE_TESTS} = "will-break-my-system" ]; then
+       if [ "$LTTNG_ENABLE_DESTRUCTIVE_TESTS" = "will-break-my-system" ]; then
                return 0
        else
                return 1
This page took 0.02378 seconds and 4 git commands to generate.