3 # Copyright (C) - 2014 Jonathan Rajotte <jonathan.r.julien@gmail.com>
5 # This library is free software; you can redistribute it and/or modify it under
6 # the terms of the GNU Lesser General Public License as published by the Free
7 # Software Foundation; version 2.1 of the License.
9 # This library is distributed in the hope that it will be useful, but WITHOUT
10 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11 # FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
14 # You should have received a copy of the GNU Lesser General Public License
15 # along with this library; if not, write to the Free Software Foundation, Inc.,
16 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18 TEST_DESC
="Machine interface testing"
21 TESTDIR
=$CURDIR/..
/..
/..
/
22 XSD_PATH
=$TESTDIR/..
/src
/common
/mi_lttng.xsd
23 SESSIOND_BIN
="lttng-sessiond"
24 RELAYD_BIN
="lttng-relayd"
26 #Test app for ust event
27 TESTAPP_PATH
="$TESTDIR/utils/testapp"
28 TESTAPP_NAME
="gen-ust-events"
29 TESTAPP_BIN
="$TESTAPP_PATH/$TESTAPP_NAME/$TESTAPP_NAME"
34 OUTPUT_DIR
=$
(mktemp
-d)
35 FOO_LOAD_DIR
=$
(mktemp
-d)
36 OUTPUT_FILE
="default.xml"
38 #Path to custom xml utilities
39 XML_VALIDATE
="$CURDIR/validate_xml $XSD_PATH"
40 XML_EXTRACT
="$CURDIR/extract_xml"
42 XPATH_CMD_OUTPUT
="//command/output"
43 XPATH_COMMAND_SUCCESS
="/command/success/text()"
44 XPATH_SESSION
="$XPATH_CMD_OUTPUT/sessions/session"
45 XPATH_ENABLE_CHANNEL_NAME
="$XPATH_CMD_OUTPUT/channels/channel/name/text()"
46 XPATH_ENABLE_EVENT_SUCCESS
="$XPATH_CMD_OUTPUT/events/event/success/text()"
47 XPATH_DISABLE_EVENT_SUCCESS
="$XPATH_CMD_OUTPUT/channel/events/event/success/text()"
48 XPATH_LIST_DOMAIN
="$XPATH_CMD_OUTPUT/sessions/session/domains/domain"
49 XPATH_LIST_CHANNEL
="$XPATH_CMD_OUTPUT/sessions/session/domains/domain/channels/channel"
50 XPATH_LIST_UST_EVENT
="$XPATH_CMD_OUTPUT/domains/domain[./type = 'UST']/pids/pid/events/event"
51 XPATH_SNAPSHOT_ADD_SNAPSHOT
="$XPATH_CMD_OUTPUT/snapshot_action[./name = 'add-output']/output"
52 XPATH_SNAPSHOT_LIST
="$XPATH_CMD_OUTPUT/snapshot_action[./name = 'list-output']/output"
53 XPATH_SNAPSHOT_DEL
="$XPATH_CMD_OUTPUT/snapshot_action[./name = 'del-output']/output"
55 DEVNULL
=/dev
/null
2>&1
57 DIR
=$
(readlink
-f $TESTDIR)
61 source $TESTDIR/utils
/utils.sh
63 #Overwrite the lttng_bin to get mi output
64 LTTNG_BIN
="lttng --mi xml"
66 #Global declaration for simplification
67 LTTNG
=$TESTDIR/..
/src
/bin
/lttng
/$LTTNG_BIN
69 #Overwrite the default output for utils.sh command
71 #MUST set TESTDIR before calling those functions
74 print_test_banner
"$TEST_DESC"
76 function extract_xml
()
82 output
=$
($XML_EXTRACT $xml "$xpath")
83 ok $?
"Extraction of xpath $xpath"
84 eval $__result="'$output'"
87 # Arg1 is path to xml file
89 # is true if we expected the success element to be false
93 function is_command_success
()
98 local xpath
=$XPATH_COMMAND_SUCCESS
100 #Extract the success element
102 extract_xml
$OUTPUT_DEST $XPATH_COMMAND_SUCCESS result
103 if [[ $expect_false = "true" ]]; then
104 if [[ $result ]]; then
105 pass
"Mi test: $xml command failed as expected"
107 fail
"Mi test: $xml command did not fail as expected"
110 if [[ $result ]]; then
111 pass
"Mi test: $xml command success"
113 fail
"Mi test: $xml command failed"
118 function mi_print_version
()
123 $LTTNG version
$opt > $1
124 ok $?
"MI test: Lttng version"
128 function test_version
()
130 OUTPUT_FILE
="version.xml"
131 OUTPUT_DEST
=$OUTPUT_DIR/$OUTPUT_FILE
132 mi_print_version
$OUTPUT_DEST
133 $XML_VALIDATE $OUTPUT_DEST
134 ok $?
"MI test: Version xsd validation"
137 function test_create_session
()
139 local session_name
="testSession"
141 OUTPUT_FILE
="create_session.xml"
142 OUTPUT_DEST
=$OUTPUT_DIR/$OUTPUT_FILE
143 create_lttng_session_ok
$session_name $OUTPUT_DIR
144 $XML_VALIDATE $OUTPUT_DEST
145 ok $?
"MI test: create session xsd validation"
147 #try to recreate a session. Expecting it to fail
148 create_lttng_session_fail
$session_name $OUTPUT_DIR
149 $XML_VALIDATE $OUTPUT_DEST
150 ok $?
"MI test: expecting fail create session xsd validation"
151 is_command_success
$OUTPUT_DEST true
154 destroy_lttng_session_ok
$session_name
157 function test_destroy_session
()
164 OUTPUT_FILE
="destroy_session.xml"
168 for (( i
= 0; i
< 3; i
++ )); do
169 create_lttng_session_ok
${session_name[$i]} $OUTPUT_DIR
172 OUTPUT_DEST
=$OUTPUT_DIR/$OUTPUT_FILE
173 destroy_lttng_session_ok
${session_name[0]}
174 $XML_VALIDATE $OUTPUT_DEST
175 ok $?
"MI test: destroy session ${session_name[0]} xsd validation"
177 #Verify that we destroyed the good session
178 extract_xml
$OUTPUT_DEST $XPATH_SESSION"/name/text()" result
179 test "$result" = "${session_name[0]}"
180 ok $?
"Mi test: deleted session: $result expected: ${session_name[0]}"
182 #Destroy all and count:should be 2
183 destroy_lttng_sessions
184 $XML_VALIDATE $OUTPUT_DEST
185 ok $?
"MI test: destroy all session xsd validation"
187 #Verify that we destroyed 2 sessions
188 extract_xml
$OUTPUT_DEST $XPATH_SESSION"/name/text()" result
189 num
=$
(echo "$result" |
wc -l)
191 ok $?
"Mi test: $num / 2 sessions discovered"
193 #Verify that if no session is present command fail and mi report it.
194 destroy_lttng_session_fail
${session_name[0]}
195 $XML_VALIDATE $OUTPUT_DEST
196 ok $?
"MI test: failing destroy session ${session_name[0]} xsd validation"
197 extract_xml
$OUTPUT_DEST $XPATH_COMMAND_SUCCESS result
198 test "$result" = "false"
199 ok $?
"Mi test: destroy command on ${session_name[0]} failed as expected"
203 function test_list_sessions
()
210 OUTPUT_FILE
="list_sessions.xml"
214 for (( i
= 0; i
< 3; i
++ )); do
215 create_lttng_session_ok
${session_name[$i]} $OUTPUT_DIR
218 OUTPUT_DEST
=$OUTPUT_DIR/$OUTPUT_FILE
220 $XML_VALIDATE $OUTPUT_DEST
221 ok $?
"Mi test: list sessions xsd validation"
223 #We should have 3 session
224 extract_xml
$OUTPUT_DEST $XPATH_SESSION"/name/text()" result
225 num
=$
(echo "$result" |
wc -l)
227 ok $?
"Mi test: $num / 3 sessions discovered"
231 destroy_lttng_sessions
234 function test_ust_channel
()
236 local session_name
="testsession"
237 local channel_name
=("channelUst0"
241 OUTPUT_FILE
="ust_channel.xml"
245 create_lttng_session_ok
$session_name $OUTPUT_DIR
247 #Test the enable_channel command
248 OUTPUT_DEST
=$OUTPUT_DIR/$OUTPUT_FILE
249 enable_ust_lttng_channel_ok
$session_name ${channel_name[0]}
250 $XML_VALIDATE $OUTPUT_DEST
251 ok $?
"Mi test: enable ust channel xsd validation"
252 is_command_success
$OUTPUT_DEST false
254 #Expect the command to fail
255 enable_ust_lttng_channel_fail
$session_name ${channel_name[0]}
256 $XML_VALIDATE $OUTPUT_DEST
257 ok $?
"Mi test: fail enable ust channel xsd validation"
258 is_command_success
$OUTPUT_DEST true
260 #Create two ust channel to test multiple disable
261 for (( i
= 1; i
< 3; i
++ )); do
262 enable_ust_lttng_channel_ok
$session_name ${channel_name[$i]}
265 #Test the disable_channel command
266 disable_ust_lttng_channel
$session_name ${channel_name[0]}
267 $XML_VALIDATE $OUTPUT_DEST
268 ok $?
"Mi test: disable ust channel xsd validation"
269 is_command_success
$OUTPUT_DEST false
270 #Check that we delete the good channel
271 extract_xml
$OUTPUT_DEST $XPATH_ENABLE_CHANNEL_NAME result
272 test "$result" = "${channel_name[0]}"
273 ok $?
"MI test: ${channel_name[0]} disabled"
275 #Test multiple disable_channel;
276 disable_ust_lttng_channel
$session_name ${channel_name[1]},${channel_name[2]}
277 $XML_VALIDATE $OUTPUT_DEST
278 ok $?
"Mi test: multiple disable ust channel xsd validation"
279 is_command_success
$OUTPUT_DEST false
281 #Make sure we have two disabled channel
282 extract_xml
$OUTPUT_DEST $XPATH_ENABLE_CHANNEL_NAME result
283 local num
=$
(echo "$result" |
wc -l)
285 ok $?
"Mi test: disabled ust channel $num/2"
289 destroy_lttng_sessions
293 function test_ust_lttng_event
()
295 local session_name
="testSession"
296 local channel_name
="testChannel"
297 local event
=("ev1" "ev2" "ev3")
299 OUTPUT_FILE
="ust_event.xml"
303 create_lttng_session_ok
$session_name $OUTPUT_DIR
304 enable_ust_lttng_channel_ok
$session_name $channel_name
306 OUTPUT_DEST
=$OUTPUT_DIR/$OUTPUT_FILE
307 #Test the enable event for ust domain
308 enable_ust_lttng_event_ok
$session_name ${event[0]} $channel_name
309 $XML_VALIDATE $OUTPUT_DEST
310 ok $?
"Mi test: Enable_event for ust domain xsd validation"
311 is_command_success
$OUTPUT_DEST false
313 #Try to reenable an enabled event. Should fail
314 enable_ust_lttng_event_fail
$session_name ${event[0]} $channel_name
315 $XML_VALIDATE $OUTPUT_DEST
316 ok $?
"Mi test: Fail enable_event for ust domain xsd validation"
317 is_command_success
$OUTPUT_DEST true
319 #Enable multiple event including the last one command will fail
320 #But 2 events should success
322 #Nice little hack, create a string ev,ev,ev
323 #IFS stand for Internal field separator
324 #Event[*] print all the element inside the array with the IFS in between
325 concat_event
=$
( IFS
=$
','; echo "${event[*]}" )
327 enable_ust_lttng_event_fail
$session_name $concat_event $channel_name
328 $XML_VALIDATE $OUTPUT_DEST
329 ok $?
"Mi test: Multiple enable ust event with inside fail xsd validation"
331 #Check for 2 success = true and 1 success = false
332 extract_xml
$OUTPUT_DEST $XPATH_ENABLE_EVENT_SUCCESS result
333 num_ocur
=$
(grep -o "true" <<< "$result" |
wc -l)
334 test "$num_ocur" -eq "2"
335 ok $?
"Mi test: Enabled event on failing enable command $num_ocur_true/2"
337 extract_xml
$OUTPUT_DEST $XPATH_ENABLE_EVENT_SUCCESS result
338 num_ocur
=$
(grep -o "false" <<< "$result" |
wc -l)
339 test "$num_ocur" -eq "1"
340 ok $?
"Mi test: Enabled event on failing enable command $num_ocur_true/2"
343 disable_ust_lttng_event
$session_name ${event[0]} $channel_name
344 $XML_VALIDATE $OUTPUT_DEST
345 ok $?
"Mi test: Disable ust event xsd validation"
346 is_command_success
$OUTPUT_DEST false
348 #Disable the 3 event combined. Should pass
349 disable_ust_lttng_event
$session_name $concat_event $channel_name
350 $XML_VALIDATE $OUTPUT_DEST
351 ok $?
"Mi test: Disable multiple ust event xsd validation"
352 is_command_success
$OUTPUT_DEST false
354 #Make sure we have 3 inner success
355 extract_xml
$OUTPUT_DEST $XPATH_DISABLE_EVENT_SUCCESS result
356 num_ocur
=$
(grep -o "true" <<< "$result" |
wc -l)
357 test "$num_ocur" -eq "3"
358 ok $?
"Mi test: Disable multiple ust event success $num_ocur/3"
362 destroy_lttng_sessions
365 function test_list_channel
()
367 local session_name
="testSession"
368 local channel_name
="testChannel"
369 local event
=("ev1" "ev2" "ev3")
371 OUTPUT_FILE
="list_channel.xml"
375 create_lttng_session_ok
$session_name $OUTPUT_DIR
376 enable_ust_lttng_channel_ok
$session_name $channel_name
378 #Enable ust and jul events
379 concat_event
=$
( IFS
=$
','; echo "${event[*]}" )
380 enable_ust_lttng_event_ok
$session_name $concat_event $channel_name
383 OUTPUT_DEST
=$OUTPUT_DIR/$OUTPUT_FILE
384 list_lttng_with_opts
"$session_name -c $channel_name"
385 $XML_VALIDATE $OUTPUT_DEST
386 ok $?
"Mi test: list channel xsd validation"
388 #Expect 1 domain: UST
389 extract_xml
$OUTPUT_DEST $XPATH_LIST_DOMAIN"/type/text()" result
390 num
=$
(echo "$result" |
wc -l)
392 ok $?
"Mi test: $num / 1 domains discovered"
394 #Expect 1 channel: test
395 extract_xml
$OUTPUT_DEST $XPATH_LIST_CHANNEL"/name/text()" result
396 num
=$
(echo "$result" |
wc -l)
398 ok $?
"Mi test: $num / 1 channel discovered"
400 test "$result" = "$channel_name"
401 ok $?
"Mi test: expected channel: $channel_name found: $result"
403 #Add a channel and make sure we have 2 channel now
405 enable_ust_lttng_channel_ok
$session_name $channel_name"a"
409 destroy_lttng_sessions
412 function test_list_domain
()
414 local session_name
="testSession"
415 local channel_name
="testChannel"
416 local event
=("ev1" "ev2" "ev3")
418 OUTPUT_FILE
="list_domain.xml"
422 create_lttng_session_ok
$session_name $OUTPUT_DIR
423 enable_ust_lttng_channel_ok
$session_name $channel_name
425 #Enable ust and jul events
426 concat_event
=$
( IFS
=$
','; echo "${event[*]}" )
427 enable_ust_lttng_event_ok
$session_name $concat_event $channel_name
428 enable_jul_lttng_event
$session_name $concat_event $channel_name
431 OUTPUT_DEST
=$OUTPUT_DIR/$OUTPUT_FILE
432 list_lttng_with_opts
"$session_name -d"
433 $XML_VALIDATE $OUTPUT_DEST
434 ok $?
"Mi test: list domain xsd validation"
436 #Expect 2 domain: Jul and UST
437 extract_xml
$OUTPUT_DEST $XPATH_LIST_DOMAIN"/type/text()" result
438 num
=$
(echo "$result" |
wc -l)
440 ok $?
"Mi test: $num / 2 domains discovered"
442 #Test for valid value
443 if [[ "$result" = *"JUL"* ]]; then
444 pass
"Mi test: domains Jul is present"
446 fail
"Mi test: domains Jul is absent"
449 if [[ "$result" = *"UST"* ]]; then
450 pass
"Mi test: domains UST is present"
452 fail
"Mi test: domains UST is absent"
457 destroy_lttng_sessions
460 function test_list_session
()
462 local session_name
="testSession"
463 local channel_name
="testChannel"
464 local event
=("ev1" "ev2" "ev3")
466 OUTPUT_FILE
="list_session.xml"
470 create_lttng_session_ok
$session_name $OUTPUT_DIR
471 enable_ust_lttng_channel_ok
$session_name $channel_name
473 #Enable ust and jul events
474 concat_event
=$
( IFS
=$
','; echo "${event[*]}" )
475 enable_ust_lttng_event_ok
$session_name $concat_event $channel_name
476 enable_jul_lttng_event
$session_name $concat_event $channel_name
479 OUTPUT_DEST
=$OUTPUT_DIR/$OUTPUT_FILE
480 list_lttng_with_opts
$session_name
481 $XML_VALIDATE $OUTPUT_DEST
482 ok $?
"Mi test: list session xsd validation"
484 #Expect 2 domain: Jul and UST
485 extract_xml
$OUTPUT_DEST $XPATH_LIST_DOMAIN"/type/text()" result
486 num
=$
(echo "$result" |
wc -l)
488 ok $?
"Mi test: $num / 2 domains discovered"
490 #Expect 2 channel: test and lttng_jul_event
491 extract_xml
$OUTPUT_DEST $XPATH_LIST_CHANNEL"/name/text()" result
492 num
=$
(echo "$result" |
wc -l)
494 ok $?
"Mi test: $num / 2 channel discovered"
498 destroy_lttng_sessions
501 function test_list_ust_event
()
503 OUTPUT_FILE
="list_ust_event.xml"
506 OUTPUT_DEST
=$OUTPUT_DIR/$OUTPUT_FILE
509 $TESTAPP_BIN $NR_USEC_WAIT & 2>/dev
/null
510 list_lttng_with_opts
"-u -f"
511 $XML_VALIDATE $OUTPUT_DEST
512 ok $?
"Mi test: list ust event xsd validation"
515 extract_xml
$OUTPUT_DEST "$XPATH_LIST_UST_EVENT""/name/text()" result
516 num
=$
(echo "$result" |
wc -l)
518 #Since the number of events is prone to change we only look for >= from a
519 #base number. An alternative would be to look for each events but this
520 #is complicated for nothing.
522 ok $?
"Mi test: $num / 5 ust events discovered"
524 #Extract field from tp:tptest event. Expect >= to 12 because number of
525 #field is prone to change.
526 extract_xml
$OUTPUT_DEST "$XPATH_LIST_UST_EVENT""[./name = 'tp:tptest']/event_fields/event_field/name/text()" result
527 num
=$
(echo "$result" |
wc -l)
529 ok $?
"Mi test: $num / 12 ust event fields discovered"
531 #Wait for all background processes
535 function test_start_stop
() {
536 local session_name
="testStartStopSession"
537 local channel_name
="startStopChannel"
539 OUTPUT_FILE
="list_start_stop.xml"
543 create_lttng_session_ok
$session_name $OUTPUT_DIR
546 #No channel enable start command should return element success false
547 OUTPUT_DEST
=$OUTPUT_DIR/$OUTPUT_FILE
548 start_lttng_tracing_fail
$session_name
549 $XML_VALIDATE $OUTPUT_DEST
550 ok $?
"Mi test: failed start xsd validation"
552 #Expect a false element
553 extract_xml
$OUTPUT_DEST $XPATH_COMMAND_SUCCESS result
554 test "$result" = "false"
555 ok $?
"Mi test: mi report failure on start command as expected"
557 #Enable a channel to test success
559 enable_ust_lttng_channel_ok
$session_name $channel_name
562 OUTPUT_DEST
=$OUTPUT_DIR/$OUTPUT_FILE
563 start_lttng_tracing_ok
$session_name
564 $XML_VALIDATE $OUTPUT_DEST
565 ok $?
"Mi test: start xsd validation"
567 #Expect a true element
568 extract_xml
$OUTPUT_DEST $XPATH_COMMAND_SUCCESS result
569 test "$result" = "true"
570 ok $?
"Mi test: mi report success on start command as expected"
572 #Extract session name from xml
573 extract_xml
$OUTPUT_DEST $XPATH_SESSION"/name/text()" result
574 test "$result" = "$session_name"
575 ok $?
"Mi test: started $session_name"
577 #Extract enabled expect true
578 extract_xml
$OUTPUT_DEST $XPATH_SESSION"/enabled/text()" result
579 test "$result" = "true"
580 ok $?
"Mi test: enabled element : $result expected: true"
583 stop_lttng_tracing_ok
$session_name
584 $XML_VALIDATE $OUTPUT_DEST
585 ok $?
"Mi test: stop xsd validation"
587 #Extract session name from xml
588 extract_xml
$OUTPUT_DEST $XPATH_SESSION"/name/text()" result
589 test "$result" = "$session_name"
590 ok $?
"Mi test: stoped $session_name"
592 #Extract enabled expect false
593 extract_xml
$OUTPUT_DEST $XPATH_SESSION"/enabled/text()" result
594 test "$result" = "false"
595 ok $?
"Mi test: enabled element : $result expected: false"
597 #Test failing stop command
598 stop_lttng_tracing_fail
$session_name
599 $XML_VALIDATE $OUTPUT_DEST
600 ok $?
"Mi test: failed stop xsd validation"
602 #Expect a false element
603 extract_xml
$OUTPUT_DEST $XPATH_COMMAND_SUCCESS result
604 test "$result" = "false"
605 ok $?
"Mi test: mi report failure on start command as expected"
609 destroy_lttng_sessions
612 function test_snapshot
() {
613 local session_name
="testSnapshotAdd"
614 local snapshot_path
="$OUTPUT_DIR/snapshotoutput"
615 OUTPUT_FILE
="snapshot.xml"
620 create_lttng_session_no_output
$session_name
623 #No channel enable start command should return element success false
624 OUTPUT_DEST
=$OUTPUT_DIR/$OUTPUT_FILE
625 lttng_snapshot_add_output_ok
$session_name $snapshot_path
626 $XML_VALIDATE $OUTPUT_DEST
627 ok $?
"Mi test: snapshot xsd validation"
629 #Expect a true element
630 extract_xml
$OUTPUT_DEST $XPATH_COMMAND_SUCCESS result
631 test "$result" = "true"
632 ok $?
"Mi test: add snapshot is a success"
635 extract_xml
$OUTPUT_DEST "$XPATH_SNAPSHOT_ADD_SNAPSHOT""/snapshot/session_name/text()" result
636 test "$result" = "$session_name"
637 ok $?
"Mi test: added snapshot for: $result expected $session_name"
639 #Get name of generated output and id
640 extract_xml
$OUTPUT_DEST "$XPATH_SNAPSHOT_ADD_SNAPSHOT""/snapshot/name/text()" snapshot_name
641 extract_xml
$OUTPUT_DEST "$XPATH_SNAPSHOT_ADD_SNAPSHOT""/snapshot/id/text()" snapshot_id
644 lttng_snapshot_list
$session_name
645 $XML_VALIDATE $OUTPUT_DEST
646 ok $?
"Mi test: snapshot list xsd validation"
648 #Expect a true element
649 extract_xml
$OUTPUT_DEST $XPATH_COMMAND_SUCCESS result
650 test "$result" = "true"
651 ok $?
"Mi test: add snapshot is a success"
653 extract_xml
$OUTPUT_DEST "$XPATH_SNAPSHOT_LIST""/session[./name ='$session_name']/snapshots/snapshot/name/text()" result
654 test "$result" = "$snapshot_name"
655 ok $?
"Mi test: snapshot list extracted snapshot: $result expected: $snapshot_name"
658 lttng_snapshot_del_output_ok
$session_name $snapshot_id
659 $XML_VALIDATE $OUTPUT_DEST
660 ok $?
"Mi test: snapshot delete xsd validation"
663 extract_xml
$OUTPUT_DEST $XPATH_COMMAND_SUCCESS result
664 test "$result" = "true"
665 ok $?
"Mi test: del snapshot is a success"
668 extract_xml
$OUTPUT_DEST "$XPATH_SNAPSHOT_DEL""/snapshot/id/text()" result
669 test "$result" = "$snapshot_id"
670 ok $?
"Mi test: snapshot del extracted snapshot id: $result expected: $snapshot_id"
672 extract_xml
$OUTPUT_DEST "$XPATH_SNAPSHOT_DEL""/snapshot/session_name/text()" result
673 test "$result" = "$session_name"
674 ok $?
"Mi test: snapshot del extracted snapshot id: $result expected: $session_name"
676 #Test fail on delete command
677 lttng_snapshot_del_output_fail
$session_name $snapshot_id
678 $XML_VALIDATE $OUTPUT_DEST
679 ok $?
"Mi test: snapshot delete xsd validation"
682 extract_xml
$OUTPUT_DEST $XPATH_COMMAND_SUCCESS result
683 test "$result" = "false"
684 ok $?
"Mi test: del snapshot is a success"
687 destroy_lttng_sessions
690 start_lttng_sessiond
$FOO_LOAD_DIR
708 for fct_test
in ${TESTS[@]};
711 if [ $?
-ne 0 ]; then
717 OUTPUT_DEST
=/dev
/null
2>&1