X-Git-Url: http://git.efficios.com/?p=lttng-tools.git;a=blobdiff_plain;f=tests%2Futils%2Futils.sh;h=90589271b5cd19ac977acc933245c55fd03e766b;hp=454627eaae3ad6115b598f3067d1f81410899631;hb=b5633831f5bfbd7fa83ade17400d3965825eb65f;hpb=67b4c664e2c6c6dc19920555c0abf094ed6cbe00 diff --git a/tests/utils/utils.sh b/tests/utils/utils.sh index 454627eaa..90589271b 100644 --- a/tests/utils/utils.sh +++ b/tests/utils/utils.sh @@ -744,13 +744,13 @@ function destroy_lttng_sessions () function lttng_snapshot_add_output () { - local sess_name=$1 - local trace_path=$2 - local expected_to_fail=$3 + local expected_to_fail=$1 + local sess_name=$2 + local trace_path=$3 $TESTDIR/../src/bin/lttng/$LTTNG_BIN snapshot add-output -s $sess_name file://$trace_path >$OUTPUT_DEST ret=$? - if [[ $expected_to_fail ]]; then + if [[ $expected_to_fail -eq 1 ]]; then test "$ret" -ne "0" ok $? "Failed to add a snapshot output file://$trace_path as expected" else @@ -758,6 +758,16 @@ function lttng_snapshot_add_output () fi } +function lttng_snapshot_add_output_ok () +{ + lttng_snapshot_add_output 0 "$@" +} + +function lttng_snapshot_add_output_fail () +{ + lttng_snapshot_add_output 1 "$@" +} + function lttng_snapshot_del_output () { local sess_name=$1