Fix: tests: quote variable in case it's not set
[lttng-tools.git] / tests / utils / utils.sh
index b17ba26ebe724326703a11cecac561f7d64eb989..d57cb3f344192e0c7e730d07a8c6c21b4a646c69 100644 (file)
@@ -1551,8 +1551,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"
 }
 
@@ -2101,7 +2102,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.026656 seconds and 5 git commands to generate.