X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=tests%2Futils%2Futils.sh;h=9df9a0bf0985fed35cdf2da8c9dc79cbbbef14b0;hp=0b126a706d3a4da30cc1576875626b2224af09e1;hb=701a99d1cf638273320db3ce52cf52816129d95a;hpb=5ebb1a9f8a0d73add742caaad62eea795274f1fa diff --git a/tests/utils/utils.sh b/tests/utils/utils.sh index 0b126a706..9df9a0bf0 100644 --- a/tests/utils/utils.sh +++ b/tests/utils/utils.sh @@ -397,22 +397,23 @@ function lttng_disable_kernel_channel_fail() function start_lttng_relayd_opt() { local withtap=$1 - local opt=$2 + local process_mode=$2 + local opt=$3 DIR=$(readlink -f "$TESTDIR") - if [ -z "$(pgrep "$RELAYD_MATCH")" ]; then + if [ -z $(pgrep $RELAYD_MATCH) ]; then # shellcheck disable=SC2086 - "$DIR/../src/bin/lttng-relayd/$RELAYD_BIN" -b $opt 1> $OUTPUT_DEST 2> $ERROR_OUTPUT_DEST - #"$DIR/../src/bin/lttng-relayd/$RELAYD_BIN" $opt -vvv >>/tmp/relayd.log 2>&1 & + $DIR/../src/bin/lttng-relayd/$RELAYD_BIN $process_mode $opt 1> $OUTPUT_DEST 2> $ERROR_OUTPUT_DEST + #$DIR/../src/bin/lttng-relayd/$RELAYD_BIN $opt -vvv >>/tmp/relayd.log 2>&1 & if [ $? -eq 1 ]; then - if [ "$withtap" -eq "1" ]; then - fail "Start lttng-relayd (opt: $opt)" + if [ $withtap -eq "1" ]; then + fail "Start lttng-relayd (process mode: $process_mode opt: $opt)" fi return 1 else - if [ "$withtap" -eq "1" ]; then - pass "Start lttng-relayd (opt: $opt)" + if [ $withtap -eq "1" ]; then + pass "Start lttng-relayd (process mode: $process_mode opt: $opt)" fi fi else @@ -422,12 +423,12 @@ function start_lttng_relayd_opt() function start_lttng_relayd() { - start_lttng_relayd_opt 1 "$@" + start_lttng_relayd_opt 1 "-b" "$@" } function start_lttng_relayd_notap() { - start_lttng_relayd_opt 0 "$@" + start_lttng_relayd_opt 0 "-b" "$@" } function stop_lttng_relayd_opt() @@ -1368,14 +1369,15 @@ function lttng_snapshot_add_output () local expected_to_fail=$1 local sess_name=$2 local trace_path=$3 + local opts=$4 - $TESTDIR/../src/bin/lttng/$LTTNG_BIN snapshot add-output -s $sess_name $trace_path 1> $OUTPUT_DEST 2> $ERROR_OUTPUT_DEST + $TESTDIR/../src/bin/lttng/$LTTNG_BIN snapshot add-output -s $sess_name $trace_path $opts 1> $OUTPUT_DEST 2> $ERROR_OUTPUT_DEST ret=$? if [[ $expected_to_fail -eq 1 ]]; then test "$ret" -ne "0" - ok $? "Added snapshot output file://$trace_path failed as expected" + ok $? "Added snapshot output $trace_path failed as expected" else - ok $ret "Added snapshot output file://$trace_path" + ok $ret "Added snapshot output $trace_path" fi }