Refactor: test: wrapper for lttng_snapshot_del_output
[lttng-tools.git] / tests / utils / utils.sh
index 90589271b5cd19ac977acc933245c55fd03e766b..1a8056d020b44240cdc7f9a79802090cabf897dd 100644 (file)
@@ -770,13 +770,13 @@ function lttng_snapshot_add_output_fail ()
 
 function lttng_snapshot_del_output ()
 {
-       local sess_name=$1
-       local id=$2
-       local expected_to_fail=$3
+       local expected_to_fail=$1
+       local sess_name=$2
+       local id=$3
 
        $TESTDIR/../src/bin/lttng/$LTTNG_BIN snapshot del-output -s $sess_name $id >$OUTPUT_DEST
        ret=$?
-       if [[ $expected_to_fail ]]; then
+       if [[ $expected_to_fail -eq "1" ]]; then
                test "$ret" -ne "0"
                ok $? "Expect fail on deletion of snapshot output id $id"
        else
@@ -784,6 +784,16 @@ function lttng_snapshot_del_output ()
        fi
 }
 
+function lttng_snapshot_del_output_ok ()
+{
+       lttng_snapshot_del_output 0 "$@"
+}
+
+function lttng_snapshot_del_output_fail ()
+{
+       lttng_snapshot_del_output 1 "$@"
+}
+
 function lttng_snapshot_record ()
 {
        local sess_name=$1
This page took 0.023289 seconds and 4 git commands to generate.