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}"
70 $python $TESTAPP_PATH/$TESTAPP_BIN -n $NR_ITER -s $NR_SEC_WAIT $opt
74 function run_app_background
79 function enable_python_loglevel_only
()
86 if [ -z $channel_name ]; then
87 # default channel if none specified
90 chan
="-c $channel_name"
93 $TESTDIR/..
/src
/bin
/lttng
/$LTTNG_BIN enable-event
--loglevel-only $loglevel "$event_name" $chan -s $sess_name -p >$OUTPUT_DEST
94 ok $?
"Enable Python event $event_name for session $sess_name with loglevel-only $loglevel"
97 function enable_python_filter
()
100 local event_name
="$2"
103 $TESTDIR/..
/src
/bin
/lttng
/$LTTNG_BIN enable-event
"$event_name" -s $sess_name -p --filter "$filter" >$OUTPUT_DEST
104 ok $?
"Enable event $event_name with filter $filter for session $sess_name"
107 function enable_python_filter_loglevel_only
()
110 local event_name
="$2"
114 $TESTDIR/..
/src
/bin
/lttng
/$LTTNG_BIN enable-event
--loglevel-only $loglevel "$event_name" -s $sess_name -p --filter "$filter" >$OUTPUT_DEST
115 ok $?
"Enable event $event_name with filter \"$filter\" and loglevel-only $loglevel for session $sess_name"
118 # MUST set TESTDIR before calling those functions
120 function test_python_before_start
()
122 local ready_file
=$
(mktemp
-u)
123 local go_file
=$
(mktemp
-u)
125 diag
"Test Python application BEFORE tracing starts"
126 create_lttng_session_ok
$SESSION_NAME $TRACE_PATH
127 enable_python_lttng_event
$SESSION_NAME $EVENT_NAME
129 # Run 5 times with a 1 second delay
130 run_app_background
$1 "" "" $ready_file $go_file
132 # Wait for ready file
133 while [ ! -e ${ready_file} ]; do
137 start_lttng_tracing_ok
$SESSION_NAME
139 # Wait for the applications started in background
140 echo "1" > ${go_file}
143 stop_lttng_tracing_ok
$SESSION_NAME
144 destroy_lttng_session_ok
$SESSION_NAME
146 # Validate test. Expecting all events.
147 trace_match_only
$EVENT_NAME $NR_ITER $TRACE_PATH
148 if [ $?
-ne 0 ]; then
155 function test_python_after_start
()
157 diag
"Test Python application AFTER tracing starts"
159 create_lttng_session_ok
$SESSION_NAME $TRACE_PATH
160 enable_python_lttng_event
$SESSION_NAME $EVENT_NAME
161 start_lttng_tracing_ok
$SESSION_NAME
163 # Run 5 times with a 1 second delay
166 stop_lttng_tracing_ok
$SESSION_NAME
167 destroy_lttng_session_ok
$SESSION_NAME
169 # Validate test. Expecting all events.
170 trace_match_only
$EVENT_NAME $NR_ITER $TRACE_PATH
171 if [ $?
-ne 0 ]; then
176 function test_python_loglevel
()
178 diag
"Test Python application with loglevel"
180 create_lttng_session_ok
$SESSION_NAME $TRACE_PATH
181 enable_python_lttng_event_loglevel
$SESSION_NAME $EVENT_NAME "INFO"
182 start_lttng_tracing_ok
$SESSION_NAME
184 # Run 5 times with a 1 second delay
187 stop_lttng_tracing_ok
$SESSION_NAME
188 destroy_lttng_session_ok
$SESSION_NAME
190 # Validate test. Expecting all events.
191 trace_match_only
$EVENT_NAME $NR_ITER $TRACE_PATH
192 if [ $?
-ne 0 ]; then
196 diag
"Test Python applications with lower loglevel"
198 create_lttng_session_ok
$SESSION_NAME $TRACE_PATH
199 enable_python_lttng_event_loglevel
$SESSION_NAME $EVENT_NAME "CRITICAL"
200 start_lttng_tracing_ok
$SESSION_NAME
202 # Run 5 times with a 1 second delay
205 stop_lttng_tracing_ok
$SESSION_NAME
206 destroy_lttng_session_ok
$SESSION_NAME
208 # Validate test. Expecting 0 events.
209 trace_match_only
$EVENT_NAME 0 $TRACE_PATH
210 if [ $?
-ne 0 ]; then
214 diag
"Test Python applications with higher loglevel"
216 create_lttng_session_ok
$SESSION_NAME $TRACE_PATH
217 enable_python_lttng_event_loglevel
$SESSION_NAME $EVENT_NAME "DEBUG"
218 start_lttng_tracing_ok
$SESSION_NAME
220 # Run 5 times with a 1 second delay
223 stop_lttng_tracing_ok
$SESSION_NAME
224 destroy_lttng_session_ok
$SESSION_NAME
226 # Validate test. Expecting all events.
227 trace_match_only
$EVENT_NAME $NR_ITER $TRACE_PATH
231 function test_python_loglevel_multiple
()
233 diag
"Test Python application with multiple loglevel"
235 create_lttng_session_ok
$SESSION_NAME $TRACE_PATH
236 enable_python_lttng_event_loglevel
$SESSION_NAME $EVENT_NAME "INFO"
237 enable_python_lttng_event_loglevel
$SESSION_NAME $EVENT_NAME "DEBUG"
238 start_lttng_tracing_ok
$SESSION_NAME
240 # Run 5 times with a 1 second delay and fire two TP.
243 stop_lttng_tracing_ok
$SESSION_NAME
244 destroy_lttng_session_ok
$SESSION_NAME
246 # Validate test. Expecting all events times two.
247 trace_match_only
$EVENT_NAME $
(($NR_ITER * 2)) $TRACE_PATH
248 if [ $?
-ne 0 ]; then
252 create_lttng_session_ok
$SESSION_NAME $TRACE_PATH
253 enable_python_lttng_event_loglevel
$SESSION_NAME '*' "INFO"
254 enable_python_lttng_event_loglevel
$SESSION_NAME '*' "DEBUG"
255 start_lttng_tracing_ok
$SESSION_NAME
257 # Run 5 times with a 1 second delay and fire two TP.
260 stop_lttng_tracing_ok
$SESSION_NAME
261 destroy_lttng_session_ok
$SESSION_NAME
263 # Validate test. Expecting all events times two.
264 trace_match_only
$EVENT_NAME $
(($NR_ITER * 2)) $TRACE_PATH
265 if [ $?
-ne 0 ]; then
270 function test_python_multi_session_loglevel
()
272 diag
"Test Python with multiple session"
274 create_lttng_session_ok
$SESSION_NAME-1 $TRACE_PATH/$SESSION_NAME-1
275 enable_python_loglevel_only
$SESSION_NAME-1 '*' "INFO"
276 start_lttng_tracing_ok
$SESSION_NAME-1
278 create_lttng_session_ok
$SESSION_NAME-2 $TRACE_PATH/$SESSION_NAME-2
279 enable_python_loglevel_only
$SESSION_NAME-2 '*' "DEBUG"
280 start_lttng_tracing_ok
$SESSION_NAME-2
282 # Run 5 times with a 1 second delay and fire second TP.
285 stop_lttng_tracing_ok
$SESSION_NAME-1
286 stop_lttng_tracing_ok
$SESSION_NAME-2
287 destroy_lttng_session_ok
$SESSION_NAME-1
288 destroy_lttng_session_ok
$SESSION_NAME-2
290 # Expecting NR_ITER events being the main event and the second tp one.
291 trace_matches
$EVENT_NAME $NR_ITER $TRACE_PATH/$SESSION_NAME-1
292 if [ $?
-ne 0 ]; then
295 trace_matches
$EVENT_NAME2 1 $TRACE_PATH/$SESSION_NAME-1
296 if [ $?
-ne 0 ]; then
300 # Expectin NR_ITER events being the debug TP.
301 trace_match_only
$EVENT_NAME $NR_ITER $TRACE_PATH/$SESSION_NAME-2
302 if [ $?
-ne 0 ]; then
307 function test_python_multi_session_disable
()
309 diag
"Test Python with multiple session with disabled event"
311 create_lttng_session_ok
$SESSION_NAME-1 $TRACE_PATH/$SESSION_NAME-1
312 enable_python_lttng_event
$SESSION_NAME-1 $EVENT_NAME
313 enable_python_lttng_event
$SESSION_NAME-1 $EVENT_NAME2
314 disable_python_lttng_event
$SESSION_NAME-1 $EVENT_NAME
315 start_lttng_tracing_ok
$SESSION_NAME-1
317 create_lttng_session_ok
$SESSION_NAME-2 $TRACE_PATH/$SESSION_NAME-2
318 enable_python_lttng_event
$SESSION_NAME-2 $EVENT_NAME2
319 start_lttng_tracing_ok
$SESSION_NAME-2
321 # Run 5 times with a 1 second delay and fire second TP.
324 stop_lttng_tracing_ok
$SESSION_NAME-1
325 stop_lttng_tracing_ok
$SESSION_NAME-2
326 destroy_lttng_session_ok
$SESSION_NAME-1
327 destroy_lttng_session_ok
$SESSION_NAME-2
329 # Validate test. Expecting one event of the second TP.
330 trace_match_only
$EVENT_NAME2 1 $TRACE_PATH/$SESSION_NAME-1
331 if [ $?
-ne 0 ]; then
335 # Validate test. Expecting one event of the second TP.
336 trace_match_only
$EVENT_NAME2 1 $TRACE_PATH/$SESSION_NAME-2
337 if [ $?
-ne 0 ]; then
342 function test_python_multi_session_disable_wildcard
()
344 diag
"Test Python with multiple session with disabled wildcard event"
346 create_lttng_session_ok
$SESSION_NAME-1 $TRACE_PATH/$SESSION_NAME-1
347 enable_python_lttng_event
$SESSION_NAME-1 '*'
349 create_lttng_session_ok
$SESSION_NAME-2 $TRACE_PATH/$SESSION_NAME-2
350 enable_python_lttng_event
$SESSION_NAME-2 '*'
352 disable_python_lttng_event
$SESSION_NAME-1 '*'
354 start_lttng_tracing_ok
$SESSION_NAME-1
355 start_lttng_tracing_ok
$SESSION_NAME-2
359 stop_lttng_tracing_ok
$SESSION_NAME-1
360 stop_lttng_tracing_ok
$SESSION_NAME-2
361 destroy_lttng_session_ok
$SESSION_NAME-1
362 destroy_lttng_session_ok
$SESSION_NAME-2
364 # Validate test. Expecting NO event of the first TP.
365 trace_match_only
$EVENT_NAME 0 $TRACE_PATH/$SESSION_NAME-1
366 if [ $?
-ne 0 ]; then
370 # Validate test. Expecting all events of the first TP.
371 trace_match_only
$EVENT_NAME $NR_ITER $TRACE_PATH/$SESSION_NAME-2
372 if [ $?
-ne 0 ]; then
377 function test_python_multi_session_disable_wildcard_begin
()
380 diag
"Test Python with multiple session with disabled wildcard (at the beginning) event"
382 create_lttng_session_ok
$SESSION_NAME-1 $TRACE_PATH/$SESSION_NAME-1
383 enable_python_lttng_event
$SESSION_NAME-1 "$ev_name"
385 create_lttng_session_ok
$SESSION_NAME-2 $TRACE_PATH/$SESSION_NAME-2
386 enable_python_lttng_event
$SESSION_NAME-2 "$ev_name"
388 disable_python_lttng_event
$SESSION_NAME-1 "$ev_name"
390 start_lttng_tracing_ok
$SESSION_NAME-1
391 start_lttng_tracing_ok
$SESSION_NAME-2
395 stop_lttng_tracing_ok
$SESSION_NAME-1
396 stop_lttng_tracing_ok
$SESSION_NAME-2
397 destroy_lttng_session_ok
$SESSION_NAME-1
398 destroy_lttng_session_ok
$SESSION_NAME-2
400 # Validate test. Expecting NO event of the first TP.
401 trace_match_only
$EVENT_NAME 0 $TRACE_PATH/$SESSION_NAME-1
402 if [ $?
-ne 0 ]; then
406 # Validate test. Expecting all events of the first TP.
407 trace_match_only
$EVENT_NAME $NR_ITER $TRACE_PATH/$SESSION_NAME-2
408 if [ $?
-ne 0 ]; then
413 function test_python_multi_session_disable_wildcard_middle
()
415 ev_name
='python-*-test1'
416 diag
"Test Python with multiple session with disabled wildcard (at the middle) event"
418 create_lttng_session_ok
$SESSION_NAME-1 $TRACE_PATH/$SESSION_NAME-1
419 enable_python_lttng_event
$SESSION_NAME-1 "$ev_name"
421 create_lttng_session_ok
$SESSION_NAME-2 $TRACE_PATH/$SESSION_NAME-2
422 enable_python_lttng_event
$SESSION_NAME-2 "$ev_name"
424 disable_python_lttng_event
$SESSION_NAME-1 "$ev_name"
426 start_lttng_tracing_ok
$SESSION_NAME-1
427 start_lttng_tracing_ok
$SESSION_NAME-2
431 stop_lttng_tracing_ok
$SESSION_NAME-1
432 stop_lttng_tracing_ok
$SESSION_NAME-2
433 destroy_lttng_session_ok
$SESSION_NAME-1
434 destroy_lttng_session_ok
$SESSION_NAME-2
436 # Validate test. Expecting NO event of the first TP.
437 trace_match_only
$EVENT_NAME 0 $TRACE_PATH/$SESSION_NAME-1
438 if [ $?
-ne 0 ]; then
442 # Validate test. Expecting all events of the first TP.
443 trace_match_only
$EVENT_NAME $NR_ITER $TRACE_PATH/$SESSION_NAME-2
444 if [ $?
-ne 0 ]; then
449 function test_python_multi_session_disable_wildcard_end
()
452 diag
"Test Python with multiple session with disabled wildcard (at the end) event"
454 create_lttng_session_ok
$SESSION_NAME-1 $TRACE_PATH/$SESSION_NAME-1
455 enable_python_lttng_event
$SESSION_NAME-1 "$ev_name"
457 create_lttng_session_ok
$SESSION_NAME-2 $TRACE_PATH/$SESSION_NAME-2
458 enable_python_lttng_event
$SESSION_NAME-2 "$ev_name"
460 disable_python_lttng_event
$SESSION_NAME-1 "$ev_name"
462 start_lttng_tracing_ok
$SESSION_NAME-1
463 start_lttng_tracing_ok
$SESSION_NAME-2
467 stop_lttng_tracing_ok
$SESSION_NAME-1
468 stop_lttng_tracing_ok
$SESSION_NAME-2
469 destroy_lttng_session_ok
$SESSION_NAME-1
470 destroy_lttng_session_ok
$SESSION_NAME-2
472 # Validate test. Expecting NO event of the first TP.
473 trace_match_only
$EVENT_NAME 0 $TRACE_PATH/$SESSION_NAME-1
474 if [ $?
-ne 0 ]; then
478 # Validate test. Expecting all events of the first TP.
479 trace_matches
$EVENT_NAME $NR_ITER $TRACE_PATH/$SESSION_NAME-2
480 if [ $?
-ne 0 ]; then
484 trace_matches
$EVENT_NAME2 1 $TRACE_PATH/$SESSION_NAME-2
485 if [ $?
-ne 0 ]; then
490 function test_python_disable_all
()
492 diag
"Test Python with multiple session with disabled all event"
494 create_lttng_session_ok
$SESSION_NAME $TRACE_PATH/$SESSION_NAME
495 enable_python_lttng_event
$SESSION_NAME '*'
496 enable_python_lttng_event
$SESSION_NAME $EVENT_NAME
497 enable_python_lttng_event
$SESSION_NAME $EVENT_NAME2
499 disable_python_lttng_event
$SESSION_NAME -a
501 start_lttng_tracing_ok
$SESSION_NAME
505 stop_lttng_tracing_ok
$SESSION_NAME
506 destroy_lttng_session_ok
$SESSION_NAME
508 # Validate test. Expecting NO event of the first TP and second TP.
509 trace_match_only
$EVENT_NAME 0 $TRACE_PATH/$SESSION_NAME
510 trace_match_only
$EVENT_NAME2 0 $TRACE_PATH/$SESSION_NAME
511 if [ $?
-ne 0 ]; then
516 function test_python_multi_session
()
518 diag
"Test Python with multiple session"
520 create_lttng_session_ok
$SESSION_NAME-1 $TRACE_PATH/$SESSION_NAME-1
521 enable_python_lttng_event
$SESSION_NAME-1 $EVENT_NAME
522 start_lttng_tracing_ok
$SESSION_NAME-1
524 create_lttng_session_ok
$SESSION_NAME-2 $TRACE_PATH/$SESSION_NAME-2
525 enable_python_lttng_event
$SESSION_NAME-2 $EVENT_NAME2
526 start_lttng_tracing_ok
$SESSION_NAME-2
528 # Run 5 times with a 1 second delay and fire second TP.
531 stop_lttng_tracing_ok
$SESSION_NAME-1
532 stop_lttng_tracing_ok
$SESSION_NAME-2
533 destroy_lttng_session_ok
$SESSION_NAME-1
534 destroy_lttng_session_ok
$SESSION_NAME-2
536 # Validate test. Expecting all events of first TP
537 trace_match_only
$EVENT_NAME $NR_ITER $TRACE_PATH/$SESSION_NAME-1
538 if [ $?
-ne 0 ]; then
542 # Validate test. Expecting one event of the second TP.
543 trace_match_only
$EVENT_NAME2 1 $TRACE_PATH/$SESSION_NAME-2
544 if [ $?
-ne 0 ]; then
549 function test_python_destroy_session
()
551 diag
"Test Python two session with destroy"
553 create_lttng_session_ok
$SESSION_NAME $TRACE_PATH/first-sess
554 enable_python_lttng_event
$SESSION_NAME $EVENT_NAME
555 start_lttng_tracing_ok
$SESSION_NAME
557 # Run 5 times with a 1 second delay
560 stop_lttng_tracing_ok
$SESSION_NAME
561 destroy_lttng_session_ok
$SESSION_NAME
563 # Validate test. Expecting at least one event num 1
564 validate_trace
$EVENT_NAME $TRACE_PATH/first-sess
565 if [ $?
-ne 0 ]; then
569 create_lttng_session_ok
$SESSION_NAME $TRACE_PATH/second-sess
570 enable_python_lttng_event
$SESSION_NAME $EVENT_NAME2
571 start_lttng_tracing_ok
$SESSION_NAME
575 stop_lttng_tracing_ok
$SESSION_NAME
576 destroy_lttng_session_ok
$SESSION_NAME
578 # Validate test. Expecting only one event num 2
579 trace_match_only
$EVENT_NAME2 1 $TRACE_PATH/second-sess
580 if [ $?
-ne 0 ]; then
585 function test_python_filtering
()
587 diag
"Test Python filtering"
589 create_lttng_session_ok
$SESSION_NAME $TRACE_PATH/$SESSION_NAME
590 # Enable all event with a filter.
591 enable_python_filter
$SESSION_NAME '*' 'msg == "python-ev-test2 fired [INFO]"'
592 start_lttng_tracing_ok
$SESSION_NAME
594 # Run 5 times with a 1 second delay and fire second TP.
597 stop_lttng_tracing_ok
$SESSION_NAME
598 destroy_lttng_session_ok
$SESSION_NAME
600 # Validate test. Expecting one event of the second TP only.
601 trace_match_only
$EVENT_NAME2 1 $TRACE_PATH/$SESSION_NAME
602 if [ $?
-ne 0 ]; then
606 create_lttng_session_ok
$SESSION_NAME $TRACE_PATH/$SESSION_NAME
607 # Enable first Logger but filter msg payload for the INFO one while
608 # triggering the debug and second TP.
609 enable_python_filter
$SESSION_NAME $EVENT_NAME 'msg == "python-ev-test1 fired [INFO]"'
610 start_lttng_tracing_ok
$SESSION_NAME
612 # Run 5 times with a 1 second delay, fire debug and second TP.
615 stop_lttng_tracing_ok
$SESSION_NAME
616 destroy_lttng_session_ok
$SESSION_NAME
618 # Validate test. Expecting NR_ITER event of the main INFO tp.
619 trace_match_only
$EVENT_NAME $NR_ITER $TRACE_PATH/$SESSION_NAME
620 if [ $?
-ne 0 ]; then
625 function test_python_disable
()
627 diag
"Test Python disable event"
629 create_lttng_session_ok
$SESSION_NAME $TRACE_PATH/$SESSION_NAME
630 # Enable all event with a filter.
631 enable_python_lttng_event
$SESSION_NAME $EVENT_NAME
632 enable_python_lttng_event
$SESSION_NAME $EVENT_NAME2
633 disable_python_lttng_event
$SESSION_NAME $EVENT_NAME
634 start_lttng_tracing_ok
$SESSION_NAME
636 # Run 5 times with a 1 second delay and fire second TP.
639 stop_lttng_tracing_ok
$SESSION_NAME
640 destroy_lttng_session_ok
$SESSION_NAME
642 # Validate test. Expecting one event of the second TP only.
643 trace_match_only
$EVENT_NAME2 1 $TRACE_PATH/$SESSION_NAME
644 if [ $?
-ne 0 ]; then
649 function test_python_disable_enable
()
651 diag
"Test Python disable event followed by an enable"
653 create_lttng_session_ok
$SESSION_NAME $TRACE_PATH/$SESSION_NAME
654 # Enable all event with a filter.
655 enable_python_lttng_event
$SESSION_NAME $EVENT_NAME
656 disable_python_lttng_event
$SESSION_NAME $EVENT_NAME
657 enable_python_lttng_event
$SESSION_NAME $EVENT_NAME
658 start_lttng_tracing_ok
$SESSION_NAME
660 # Run 5 times with a 1 second delay and fire second TP.
663 stop_lttng_tracing_ok
$SESSION_NAME
664 destroy_lttng_session_ok
$SESSION_NAME
666 # Validate test. Expecting NR_ITER event of the main INFO tp.
667 trace_match_only
$EVENT_NAME $NR_ITER $TRACE_PATH/$SESSION_NAME
668 if [ $?
-ne 0 ]; then
673 function test_python_filter_loglevel
()
675 local BOGUS_EVENT_NAME
="not_a_real_event"
676 local FILTER
="int_loglevel > 30 || int_loglevel < 30"
679 diag
"Test Python a filter with a loglevel"
681 create_lttng_session_ok
$SESSION_NAME $TRACE_PATH/$SESSION_NAME
682 # Enable an event with a filter and the loglevel-only option.
683 enable_python_filter_loglevel_only
$SESSION_NAME $BOGUS_EVENT_NAME "$FILTER" "INFO"
684 disable_python_lttng_event
$SESSION_NAME $BOGUS_EVENT_NAME
685 enable_python_filter_loglevel_only
$SESSION_NAME $BOGUS_EVENT_NAME "$FILTER" "INFO"
686 start_lttng_tracing_ok
$SESSION_NAME
688 # Run 5 times with a 1 second delay and fire second TP.
691 stop_lttng_tracing_ok
$SESSION_NAME
692 destroy_lttng_session_ok
$SESSION_NAME
694 # Validate test. Expecting no events.
695 trace_match_only
$ALL_EVENTS 0 $TRACE_PATH/$SESSION_NAME
696 if [ $?
-ne 0 ]; then
701 plan_tests
$NUM_TESTS
703 print_test_banner
"$TEST_DESC"
705 if [[ ${#python_versions[@]} -eq 0 ||
"x$run_test" != "xyes" ]]; then
711 skip
$skip_agent "Python agent test skipped." $NUM_TESTS ||
716 test_python_multi_session_disable_wildcard
717 test_python_multi_session_disable_wildcard_begin
718 test_python_multi_session_disable_wildcard_middle
719 test_python_multi_session_disable_wildcard_end
720 test_python_multi_session_disable
722 test_python_disable_enable
723 test_python_disable_all
724 test_python_filtering
725 test_python_multi_session_loglevel
726 test_python_destroy_session
728 test_python_loglevel_multiple
729 test_python_before_start
730 test_python_after_start
731 test_python_multi_session
732 test_python_filter_loglevel
736 for python_version
in ${python_versions[*]};
738 for fct_test
in ${tests[@]};
740 TRACE_PATH
=$
(mktemp
-d)
742 diag
"(Python $python_version)"
743 ${fct_test} $python_version
744 if [ $?
-ne 0 ]; then