3 # Copyright (C) - 2015 Philippe Proulx <pproulx@efficios.com>
4 # Copyright (C) - 2014 David Goulet <dgoulet@efficios.com>
6 # This program is free software; you can redistribute it and/or modify it under
7 # the terms of the GNU General Public License, version 2 only, as published by
8 # the Free Software Foundation.
10 # This program is distributed in the hope that it will be useful, but WITHOUT
11 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12 # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
15 # You should have received a copy of the GNU General Public License along with
16 # this program; if not, write to the Free Software Foundation, Inc., 51
17 # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 TEST_DESC
="Python support"
22 TESTDIR
=$CURDIR/..
/..
/..
26 TESTAPP_BIN
="$TESTAPP_NAME.py"
27 TESTAPP_PATH
="@abs_top_srcdir@/tests/regression/ust/python-logging"
28 SESSION_NAME
="python-test"
29 EVENT_NAME
="python-ev-test1"
30 EVENT_NAME2
="python-ev-test2"
31 OUTPUT_DEST
="/dev/null"
33 python_versions
=(@PYTHON2_AGENT@ @PYTHON3_AGENT@
)
34 run_test
=@RUN_PYTHON_AGENT_TEST@
36 if [[ -z "$run_test" ]]; then
39 NUM_TESTS
=$
(((194 * ${#python_versions[@]})+2))
42 source $TESTDIR/utils
/utils.sh
48 local fire_second_tp
=$3
53 if [[ -n "$debug_tp" ]] && [ "$debug_tp" -eq "1" ]; then
57 if [[ -n "$fire_second_tp" ]] && [ "$fire_second_tp" -eq "1" ]; then
61 if [[ -n "$ready_file" ]]; then
62 opt
="${opt} -r ${ready_file}"
65 if [[ -n "$go_file" ]]; then
66 opt
="${opt} -g ${go_file}"
69 $python $TESTAPP_PATH/$TESTAPP_BIN -n $NR_ITER -s $NR_SEC_WAIT $opt
72 function run_app_background
77 function enable_python_loglevel_only
()
84 if [ -z $channel_name ]; then
85 # default channel if none specified
88 chan
="-c $channel_name"
91 $TESTDIR/..
/src
/bin
/lttng
/$LTTNG_BIN enable-event
--loglevel-only $loglevel "$event_name" $chan -s $sess_name -p >$OUTPUT_DEST
92 ok $?
"Enable Python event $event_name for session $sess_name with loglevel-only $loglevel"
95 function enable_python_filter
()
101 $TESTDIR/..
/src
/bin
/lttng
/$LTTNG_BIN enable-event
"$event_name" -s $sess_name -p --filter "$filter" >$OUTPUT_DEST
102 ok $?
"Enable event $event_name with filter $filter for session $sess_name"
105 function enable_python_filter_loglevel_only
()
108 local event_name
="$2"
112 $TESTDIR/..
/src
/bin
/lttng
/$LTTNG_BIN enable-event
--loglevel-only $loglevel "$event_name" -s $sess_name -p --filter "$filter" >$OUTPUT_DEST
113 ok $?
"Enable event $event_name with filter \"$filter\" and loglevel-only $loglevel for session $sess_name"
116 # MUST set TESTDIR before calling those functions
118 function test_python_before_start
()
120 local ready_file
=$
(mktemp
-u)
121 local go_file
=$
(mktemp
-u)
123 diag
"Test Python application BEFORE tracing starts"
124 create_lttng_session_ok
$SESSION_NAME $TRACE_PATH
125 enable_python_lttng_event
$SESSION_NAME $EVENT_NAME
127 # Run 5 times with a 1 second delay
128 run_app_background
$1 "" "" $ready_file $go_file
130 # Wait for ready file
131 while [ ! -e ${ready_file} ]; do
135 start_lttng_tracing_ok
$SESSION_NAME
137 # Wait for the applications started in background
138 echo "1" > ${go_file}
141 stop_lttng_tracing_ok
$SESSION_NAME
142 destroy_lttng_session_ok
$SESSION_NAME
144 # Validate test. Expecting all events.
145 trace_match_only
$EVENT_NAME $NR_ITER $TRACE_PATH
146 if [ $?
-ne 0 ]; then
153 function test_python_after_start
()
155 diag
"Test Python application AFTER tracing starts"
157 create_lttng_session_ok
$SESSION_NAME $TRACE_PATH
158 enable_python_lttng_event
$SESSION_NAME $EVENT_NAME
159 start_lttng_tracing_ok
$SESSION_NAME
161 # Run 5 times with a 1 second delay
164 stop_lttng_tracing_ok
$SESSION_NAME
165 destroy_lttng_session_ok
$SESSION_NAME
167 # Validate test. Expecting all events.
168 trace_match_only
$EVENT_NAME $NR_ITER $TRACE_PATH
169 if [ $?
-ne 0 ]; then
174 function test_python_loglevel
()
176 diag
"Test Python application with loglevel"
178 create_lttng_session_ok
$SESSION_NAME $TRACE_PATH
179 enable_python_lttng_event_loglevel
$SESSION_NAME $EVENT_NAME "INFO"
180 start_lttng_tracing_ok
$SESSION_NAME
182 # Run 5 times with a 1 second delay
185 stop_lttng_tracing_ok
$SESSION_NAME
186 destroy_lttng_session_ok
$SESSION_NAME
188 # Validate test. Expecting all events.
189 trace_match_only
$EVENT_NAME $NR_ITER $TRACE_PATH
190 if [ $?
-ne 0 ]; then
194 diag
"Test Python applications with lower loglevel"
196 create_lttng_session_ok
$SESSION_NAME $TRACE_PATH
197 enable_python_lttng_event_loglevel
$SESSION_NAME $EVENT_NAME "CRITICAL"
198 start_lttng_tracing_ok
$SESSION_NAME
200 # Run 5 times with a 1 second delay
203 stop_lttng_tracing_ok
$SESSION_NAME
204 destroy_lttng_session_ok
$SESSION_NAME
206 # Validate test. Expecting 0 events.
207 trace_match_only
$EVENT_NAME 0 $TRACE_PATH
208 if [ $?
-ne 0 ]; then
212 diag
"Test Python applications with higher loglevel"
214 create_lttng_session_ok
$SESSION_NAME $TRACE_PATH
215 enable_python_lttng_event_loglevel
$SESSION_NAME $EVENT_NAME "DEBUG"
216 start_lttng_tracing_ok
$SESSION_NAME
218 # Run 5 times with a 1 second delay
221 stop_lttng_tracing_ok
$SESSION_NAME
222 destroy_lttng_session_ok
$SESSION_NAME
224 # Validate test. Expecting all events.
225 trace_match_only
$EVENT_NAME $NR_ITER $TRACE_PATH
229 function test_python_loglevel_multiple
()
231 diag
"Test Python application with multiple loglevel"
233 create_lttng_session_ok
$SESSION_NAME $TRACE_PATH
234 enable_python_lttng_event_loglevel
$SESSION_NAME $EVENT_NAME "INFO"
235 enable_python_lttng_event_loglevel
$SESSION_NAME $EVENT_NAME "DEBUG"
236 start_lttng_tracing_ok
$SESSION_NAME
238 # Run 5 times with a 1 second delay and fire two TP.
241 stop_lttng_tracing_ok
$SESSION_NAME
242 destroy_lttng_session_ok
$SESSION_NAME
244 # Validate test. Expecting all events times two.
245 trace_match_only
$EVENT_NAME $
(($NR_ITER * 2)) $TRACE_PATH
246 if [ $?
-ne 0 ]; then
250 create_lttng_session_ok
$SESSION_NAME $TRACE_PATH
251 enable_python_lttng_event_loglevel
$SESSION_NAME '*' "INFO"
252 enable_python_lttng_event_loglevel
$SESSION_NAME '*' "DEBUG"
253 start_lttng_tracing_ok
$SESSION_NAME
255 # Run 5 times with a 1 second delay and fire two TP.
258 stop_lttng_tracing_ok
$SESSION_NAME
259 destroy_lttng_session_ok
$SESSION_NAME
261 # Validate test. Expecting all events times two.
262 trace_match_only
$EVENT_NAME $
(($NR_ITER * 2)) $TRACE_PATH
263 if [ $?
-ne 0 ]; then
268 function test_python_multi_session_loglevel
()
270 diag
"Test Python with multiple session"
272 create_lttng_session_ok
$SESSION_NAME-1 $TRACE_PATH/$SESSION_NAME-1
273 enable_python_loglevel_only
$SESSION_NAME-1 '*' "INFO"
274 start_lttng_tracing_ok
$SESSION_NAME-1
276 create_lttng_session_ok
$SESSION_NAME-2 $TRACE_PATH/$SESSION_NAME-2
277 enable_python_loglevel_only
$SESSION_NAME-2 '*' "DEBUG"
278 start_lttng_tracing_ok
$SESSION_NAME-2
280 # Run 5 times with a 1 second delay and fire second TP.
283 stop_lttng_tracing_ok
$SESSION_NAME-1
284 stop_lttng_tracing_ok
$SESSION_NAME-2
285 destroy_lttng_session_ok
$SESSION_NAME-1
286 destroy_lttng_session_ok
$SESSION_NAME-2
288 # Expecting NR_ITER events being the main event and the second tp one.
289 trace_matches
$EVENT_NAME $NR_ITER $TRACE_PATH/$SESSION_NAME-1
290 if [ $?
-ne 0 ]; then
293 trace_matches
$EVENT_NAME2 1 $TRACE_PATH/$SESSION_NAME-1
294 if [ $?
-ne 0 ]; then
298 # Expectin NR_ITER events being the debug TP.
299 trace_match_only
$EVENT_NAME $NR_ITER $TRACE_PATH/$SESSION_NAME-2
300 if [ $?
-ne 0 ]; then
305 function test_python_multi_session_disable
()
307 diag
"Test Python with multiple session with disabled event"
309 create_lttng_session_ok
$SESSION_NAME-1 $TRACE_PATH/$SESSION_NAME-1
310 enable_python_lttng_event
$SESSION_NAME-1 $EVENT_NAME
311 enable_python_lttng_event
$SESSION_NAME-1 $EVENT_NAME2
312 disable_python_lttng_event
$SESSION_NAME-1 $EVENT_NAME
313 start_lttng_tracing_ok
$SESSION_NAME-1
315 create_lttng_session_ok
$SESSION_NAME-2 $TRACE_PATH/$SESSION_NAME-2
316 enable_python_lttng_event
$SESSION_NAME-2 $EVENT_NAME2
317 start_lttng_tracing_ok
$SESSION_NAME-2
319 # Run 5 times with a 1 second delay and fire second TP.
322 stop_lttng_tracing_ok
$SESSION_NAME-1
323 stop_lttng_tracing_ok
$SESSION_NAME-2
324 destroy_lttng_session_ok
$SESSION_NAME-1
325 destroy_lttng_session_ok
$SESSION_NAME-2
327 # Validate test. Expecting one event of the second TP.
328 trace_match_only
$EVENT_NAME2 1 $TRACE_PATH/$SESSION_NAME-1
329 if [ $?
-ne 0 ]; then
333 # Validate test. Expecting one event of the second TP.
334 trace_match_only
$EVENT_NAME2 1 $TRACE_PATH/$SESSION_NAME-2
335 if [ $?
-ne 0 ]; then
340 function test_python_multi_session_disable_wildcard
()
342 diag
"Test Python with multiple session with disabled wildcard event"
344 create_lttng_session_ok
$SESSION_NAME-1 $TRACE_PATH/$SESSION_NAME-1
345 enable_python_lttng_event
$SESSION_NAME-1 '*'
347 create_lttng_session_ok
$SESSION_NAME-2 $TRACE_PATH/$SESSION_NAME-2
348 enable_python_lttng_event
$SESSION_NAME-2 '*'
350 disable_python_lttng_event
$SESSION_NAME-1 '*'
352 start_lttng_tracing_ok
$SESSION_NAME-1
353 start_lttng_tracing_ok
$SESSION_NAME-2
357 stop_lttng_tracing_ok
$SESSION_NAME-1
358 stop_lttng_tracing_ok
$SESSION_NAME-2
359 destroy_lttng_session_ok
$SESSION_NAME-1
360 destroy_lttng_session_ok
$SESSION_NAME-2
362 # Validate test. Expecting NO event of the first TP.
363 trace_match_only
$EVENT_NAME 0 $TRACE_PATH/$SESSION_NAME-1
364 if [ $?
-ne 0 ]; then
368 # Validate test. Expecting all events of the first TP.
369 trace_match_only
$EVENT_NAME $NR_ITER $TRACE_PATH/$SESSION_NAME-2
370 if [ $?
-ne 0 ]; then
375 function test_python_multi_session_disable_wildcard_begin
()
378 diag
"Test Python with multiple session with disabled wildcard (at the beginning) event"
380 create_lttng_session_ok
$SESSION_NAME-1 $TRACE_PATH/$SESSION_NAME-1
381 enable_python_lttng_event
$SESSION_NAME-1 "$ev_name"
383 create_lttng_session_ok
$SESSION_NAME-2 $TRACE_PATH/$SESSION_NAME-2
384 enable_python_lttng_event
$SESSION_NAME-2 "$ev_name"
386 disable_python_lttng_event
$SESSION_NAME-1 "$ev_name"
388 start_lttng_tracing_ok
$SESSION_NAME-1
389 start_lttng_tracing_ok
$SESSION_NAME-2
393 stop_lttng_tracing_ok
$SESSION_NAME-1
394 stop_lttng_tracing_ok
$SESSION_NAME-2
395 destroy_lttng_session_ok
$SESSION_NAME-1
396 destroy_lttng_session_ok
$SESSION_NAME-2
398 # Validate test. Expecting NO event of the first TP.
399 trace_match_only
$EVENT_NAME 0 $TRACE_PATH/$SESSION_NAME-1
400 if [ $?
-ne 0 ]; then
404 # Validate test. Expecting all events of the first TP.
405 trace_match_only
$EVENT_NAME $NR_ITER $TRACE_PATH/$SESSION_NAME-2
406 if [ $?
-ne 0 ]; then
411 function test_python_multi_session_disable_wildcard_middle
()
413 ev_name
='python-*-test1'
414 diag
"Test Python with multiple session with disabled wildcard (at the middle) event"
416 create_lttng_session_ok
$SESSION_NAME-1 $TRACE_PATH/$SESSION_NAME-1
417 enable_python_lttng_event
$SESSION_NAME-1 "$ev_name"
419 create_lttng_session_ok
$SESSION_NAME-2 $TRACE_PATH/$SESSION_NAME-2
420 enable_python_lttng_event
$SESSION_NAME-2 "$ev_name"
422 disable_python_lttng_event
$SESSION_NAME-1 "$ev_name"
424 start_lttng_tracing_ok
$SESSION_NAME-1
425 start_lttng_tracing_ok
$SESSION_NAME-2
429 stop_lttng_tracing_ok
$SESSION_NAME-1
430 stop_lttng_tracing_ok
$SESSION_NAME-2
431 destroy_lttng_session_ok
$SESSION_NAME-1
432 destroy_lttng_session_ok
$SESSION_NAME-2
434 # Validate test. Expecting NO event of the first TP.
435 trace_match_only
$EVENT_NAME 0 $TRACE_PATH/$SESSION_NAME-1
436 if [ $?
-ne 0 ]; then
440 # Validate test. Expecting all events of the first TP.
441 trace_match_only
$EVENT_NAME $NR_ITER $TRACE_PATH/$SESSION_NAME-2
442 if [ $?
-ne 0 ]; then
447 function test_python_multi_session_disable_wildcard_end
()
450 diag
"Test Python with multiple session with disabled wildcard (at the end) event"
452 create_lttng_session_ok
$SESSION_NAME-1 $TRACE_PATH/$SESSION_NAME-1
453 enable_python_lttng_event
$SESSION_NAME-1 "$ev_name"
455 create_lttng_session_ok
$SESSION_NAME-2 $TRACE_PATH/$SESSION_NAME-2
456 enable_python_lttng_event
$SESSION_NAME-2 "$ev_name"
458 disable_python_lttng_event
$SESSION_NAME-1 "$ev_name"
460 start_lttng_tracing_ok
$SESSION_NAME-1
461 start_lttng_tracing_ok
$SESSION_NAME-2
465 stop_lttng_tracing_ok
$SESSION_NAME-1
466 stop_lttng_tracing_ok
$SESSION_NAME-2
467 destroy_lttng_session_ok
$SESSION_NAME-1
468 destroy_lttng_session_ok
$SESSION_NAME-2
470 # Validate test. Expecting NO event of the first TP.
471 trace_match_only
$EVENT_NAME 0 $TRACE_PATH/$SESSION_NAME-1
472 if [ $?
-ne 0 ]; then
476 # Validate test. Expecting all events of the first TP.
477 trace_matches
$EVENT_NAME $NR_ITER $TRACE_PATH/$SESSION_NAME-2
478 if [ $?
-ne 0 ]; then
482 trace_matches
$EVENT_NAME2 1 $TRACE_PATH/$SESSION_NAME-2
483 if [ $?
-ne 0 ]; then
488 function test_python_disable_all
()
490 diag
"Test Python with multiple session with disabled all event"
492 create_lttng_session_ok
$SESSION_NAME $TRACE_PATH/$SESSION_NAME
493 enable_python_lttng_event
$SESSION_NAME '*'
494 enable_python_lttng_event
$SESSION_NAME $EVENT_NAME
495 enable_python_lttng_event
$SESSION_NAME $EVENT_NAME2
497 disable_python_lttng_event
$SESSION_NAME -a
499 start_lttng_tracing_ok
$SESSION_NAME
503 stop_lttng_tracing_ok
$SESSION_NAME
504 destroy_lttng_session_ok
$SESSION_NAME
506 # Validate test. Expecting NO event of the first TP and second TP.
507 trace_match_only
$EVENT_NAME 0 $TRACE_PATH/$SESSION_NAME
508 trace_match_only
$EVENT_NAME2 0 $TRACE_PATH/$SESSION_NAME
509 if [ $?
-ne 0 ]; then
514 function test_python_multi_session
()
516 diag
"Test Python with multiple session"
518 create_lttng_session_ok
$SESSION_NAME-1 $TRACE_PATH/$SESSION_NAME-1
519 enable_python_lttng_event
$SESSION_NAME-1 $EVENT_NAME
520 start_lttng_tracing_ok
$SESSION_NAME-1
522 create_lttng_session_ok
$SESSION_NAME-2 $TRACE_PATH/$SESSION_NAME-2
523 enable_python_lttng_event
$SESSION_NAME-2 $EVENT_NAME2
524 start_lttng_tracing_ok
$SESSION_NAME-2
526 # Run 5 times with a 1 second delay and fire second TP.
529 stop_lttng_tracing_ok
$SESSION_NAME-1
530 stop_lttng_tracing_ok
$SESSION_NAME-2
531 destroy_lttng_session_ok
$SESSION_NAME-1
532 destroy_lttng_session_ok
$SESSION_NAME-2
534 # Validate test. Expecting all events of first TP
535 trace_match_only
$EVENT_NAME $NR_ITER $TRACE_PATH/$SESSION_NAME-1
536 if [ $?
-ne 0 ]; then
540 # Validate test. Expecting one event of the second TP.
541 trace_match_only
$EVENT_NAME2 1 $TRACE_PATH/$SESSION_NAME-2
542 if [ $?
-ne 0 ]; then
547 function test_python_destroy_session
()
549 diag
"Test Python two session with destroy"
551 create_lttng_session_ok
$SESSION_NAME $TRACE_PATH/first-sess
552 enable_python_lttng_event
$SESSION_NAME $EVENT_NAME
553 start_lttng_tracing_ok
$SESSION_NAME
555 # Run 5 times with a 1 second delay
558 stop_lttng_tracing_ok
$SESSION_NAME
559 destroy_lttng_session_ok
$SESSION_NAME
561 # Validate test. Expecting at least one event num 1
562 validate_trace
$EVENT_NAME $TRACE_PATH/first-sess
563 if [ $?
-ne 0 ]; then
567 create_lttng_session_ok
$SESSION_NAME $TRACE_PATH/second-sess
568 enable_python_lttng_event
$SESSION_NAME $EVENT_NAME2
569 start_lttng_tracing_ok
$SESSION_NAME
573 stop_lttng_tracing_ok
$SESSION_NAME
574 destroy_lttng_session_ok
$SESSION_NAME
576 # Validate test. Expecting only one event num 2
577 trace_match_only
$EVENT_NAME2 1 $TRACE_PATH/second-sess
578 if [ $?
-ne 0 ]; then
583 function test_python_filtering
()
585 diag
"Test Python filtering"
587 create_lttng_session_ok
$SESSION_NAME $TRACE_PATH/$SESSION_NAME
588 # Enable all event with a filter.
589 enable_python_filter
$SESSION_NAME '*' 'msg == "python-ev-test2 fired [INFO]"'
590 start_lttng_tracing_ok
$SESSION_NAME
592 # Run 5 times with a 1 second delay and fire second TP.
595 stop_lttng_tracing_ok
$SESSION_NAME
596 destroy_lttng_session_ok
$SESSION_NAME
598 # Validate test. Expecting one event of the second TP only.
599 trace_match_only
$EVENT_NAME2 1 $TRACE_PATH/$SESSION_NAME
600 if [ $?
-ne 0 ]; then
604 create_lttng_session_ok
$SESSION_NAME $TRACE_PATH/$SESSION_NAME
605 # Enable first Logger but filter msg payload for the INFO one while
606 # triggering the debug and second TP.
607 enable_python_filter
$SESSION_NAME $EVENT_NAME 'msg == "python-ev-test1 fired [INFO]"'
608 start_lttng_tracing_ok
$SESSION_NAME
610 # Run 5 times with a 1 second delay, fire debug and second TP.
613 stop_lttng_tracing_ok
$SESSION_NAME
614 destroy_lttng_session_ok
$SESSION_NAME
616 # Validate test. Expecting NR_ITER event of the main INFO tp.
617 trace_match_only
$EVENT_NAME $NR_ITER $TRACE_PATH/$SESSION_NAME
618 if [ $?
-ne 0 ]; then
623 function test_python_disable
()
625 diag
"Test Python disable event"
627 create_lttng_session_ok
$SESSION_NAME $TRACE_PATH/$SESSION_NAME
628 # Enable all event with a filter.
629 enable_python_lttng_event
$SESSION_NAME $EVENT_NAME
630 enable_python_lttng_event
$SESSION_NAME $EVENT_NAME2
631 disable_python_lttng_event
$SESSION_NAME $EVENT_NAME
632 start_lttng_tracing_ok
$SESSION_NAME
634 # Run 5 times with a 1 second delay and fire second TP.
637 stop_lttng_tracing_ok
$SESSION_NAME
638 destroy_lttng_session_ok
$SESSION_NAME
640 # Validate test. Expecting one event of the second TP only.
641 trace_match_only
$EVENT_NAME2 1 $TRACE_PATH/$SESSION_NAME
642 if [ $?
-ne 0 ]; then
647 function test_python_disable_enable
()
649 diag
"Test Python disable event followed by an enable"
651 create_lttng_session_ok
$SESSION_NAME $TRACE_PATH/$SESSION_NAME
652 # Enable all event with a filter.
653 enable_python_lttng_event
$SESSION_NAME $EVENT_NAME
654 disable_python_lttng_event
$SESSION_NAME $EVENT_NAME
655 enable_python_lttng_event
$SESSION_NAME $EVENT_NAME
656 start_lttng_tracing_ok
$SESSION_NAME
658 # Run 5 times with a 1 second delay and fire second TP.
661 stop_lttng_tracing_ok
$SESSION_NAME
662 destroy_lttng_session_ok
$SESSION_NAME
664 # Validate test. Expecting NR_ITER event of the main INFO tp.
665 trace_match_only
$EVENT_NAME $NR_ITER $TRACE_PATH/$SESSION_NAME
666 if [ $?
-ne 0 ]; then
671 function test_python_filter_loglevel
()
673 local BOGUS_EVENT_NAME
="not_a_real_event"
674 local FILTER
="int_loglevel > 30 || int_loglevel < 30"
677 diag
"Test Python a filter with a loglevel"
679 create_lttng_session_ok
$SESSION_NAME $TRACE_PATH/$SESSION_NAME
680 # Enable an event with a filter and the loglevel-only option.
681 enable_python_filter_loglevel_only
$SESSION_NAME $BOGUS_EVENT_NAME "$FILTER" "INFO"
682 disable_python_lttng_event
$SESSION_NAME $BOGUS_EVENT_NAME
683 enable_python_filter_loglevel_only
$SESSION_NAME $BOGUS_EVENT_NAME "$FILTER" "INFO"
684 start_lttng_tracing_ok
$SESSION_NAME
686 # Run 5 times with a 1 second delay and fire second TP.
689 stop_lttng_tracing_ok
$SESSION_NAME
690 destroy_lttng_session_ok
$SESSION_NAME
692 # Validate test. Expecting no events.
693 trace_match_only
$ALL_EVENTS 0 $TRACE_PATH/$SESSION_NAME
694 if [ $?
-ne 0 ]; then
699 plan_tests
$NUM_TESTS
701 print_test_banner
"$TEST_DESC"
703 if [[ ${#python_versions[@]} -eq 0 ||
"x$run_test" != "xyes" ]]; then
709 skip
$skip_agent "Python agent test skipped." $NUM_TESTS ||
714 test_python_multi_session_disable_wildcard
715 test_python_multi_session_disable_wildcard_begin
716 test_python_multi_session_disable_wildcard_middle
717 test_python_multi_session_disable_wildcard_end
718 test_python_multi_session_disable
720 test_python_disable_enable
721 test_python_disable_all
722 test_python_filtering
723 test_python_multi_session_loglevel
724 test_python_destroy_session
726 test_python_loglevel_multiple
727 test_python_before_start
728 test_python_after_start
729 test_python_multi_session
730 test_python_filter_loglevel
734 for python_version
in ${python_versions[*]};
736 for fct_test
in ${tests[@]};
738 TRACE_PATH
=$
(mktemp
-d)
740 diag
"(Python $python_version)"
741 ${fct_test} $python_version
742 if [ $?
-ne 0 ]; then