ok $? "Mi test: snapshot list extracted snapshot: $result expected: $snapshot_name"
#Test del output
- lttng_snapshot_del_output $session_name $snapshot_id
+ lttng_snapshot_del_output_ok $session_name $snapshot_id
$XML_VALIDATE $OUTPUT_DEST
ok $? "Mi test: snapshot delete xsd validation"
ok $? "Mi test: snapshot del extracted snapshot id: $result expected: $session_name"
#Test fail on delete command
- lttng_snapshot_del_output $session_name $snapshot_id 1
+ lttng_snapshot_del_output_fail $session_name $snapshot_id
$XML_VALIDATE $OUTPUT_DEST
ok $? "Mi test: snapshot delete xsd validation"
return $?
fi
- lttng_snapshot_del_output $SESSION_NAME 1
+ lttng_snapshot_del_output_ok $SESSION_NAME 1
snapshot_add_output $SESSION_NAME "net://localhost"
lttng_snapshot_record $SESSION_NAME
return $?
fi
- lttng_snapshot_del_output $SESSION_NAME 1
+ lttng_snapshot_del_output_ok $SESSION_NAME 1
snapshot_add_output $SESSION_NAME "net://localhost"
lttng_snapshot_record $SESSION_NAME
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
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