3 # Copyright (C) 2014 David Goulet <dgoulet@efficios.com>
5 # SPDX-License-Identifier: GPL-2.0-only
7 TEST_DESC
="Java LOG4J support"
10 TESTDIR
=$CURDIR/..
/..
/..
13 TESTAPP_NAME
="JTestLTTng"
14 TESTAPP_BIN
="$TESTAPP_NAME.java"
15 TESTAPP_PATH
="$CURDIR/$TESTAPP_NAME"
17 EVENT_NAME
="log4j-event"
18 EVENT_NAME2
="log4j-event-2"
19 JAVA_CP
="$CURDIR:$CLASSPATH"
20 OUTPUT_DEST
="/dev/null"
24 source $TESTDIR/utils
/utils.sh
29 local fire_second_tp
=$2
31 # FIXME: test app should have synchro.
32 java
-cp $JAVA_CP -Djava.library.path
="$LD_LIBRARY_PATH:/usr/local/lib:/usr/lib" $TESTAPP_NAME $NR_ITER $NR_MSEC_WAIT $debug_tp $fire_second_tp >/dev
/null
2>&1
35 function run_app_background
40 function enable_log4j_loglevel_only
()
47 if [ -z $channel_name ]; then
48 # default channel if none specified
51 chan
="-c $channel_name"
54 $TESTDIR/..
/src
/bin
/lttng
/$LTTNG_BIN enable-event
--loglevel-only $loglevel "$event_name" $chan -s $sess_name -l >/dev
/null
2>&1
55 ok $?
"Enable LOG4J event $event_name for session $sess_name with loglevel-only $loglevel"
58 function enable_log4j_filter
()
64 $TESTDIR/..
/src
/bin
/lttng
/$LTTNG_BIN enable-event
"$event_name" -s $sess_name -l --filter "$filter" >/dev
/null
2>&1
65 ok $?
"Enable event $event_name with filter $filter for session $sess_name"
68 function enable_log4j_filter_loglevel_only
()
75 $TESTDIR/..
/src
/bin
/lttng
/$LTTNG_BIN enable-event
--loglevel-only $loglevel "$event_name" -s $sess_name -l --filter "$filter" >/dev
/null
2>&1
76 ok $?
"Enable event $event_name with filter \"$filter\" and loglevel-only $loglevel for session $sess_name"
79 # MUST set TESTDIR before calling those functions
81 function test_log4j_before_start
()
83 local file_sync_after_first
=$
(mktemp
--tmpdir -u "tmp.${FUNCNAME[0]}_sync_after_first.XXXXXX")
84 local file_sync_before_last
=$
(mktemp
--tmpdir -u "tmp.${FUNCNAME[0]}_sync_before_last.XXXXXX")
86 diag
"Test LOG4J application BEFORE tracing starts"
87 create_lttng_session_ok
$SESSION_NAME $TRACE_PATH
88 enable_log4j_lttng_event
$SESSION_NAME $EVENT_NAME
90 # Run 5 times with a 1 second delay
93 start_lttng_tracing_ok
$SESSION_NAME
95 touch ${file_sync_before_last}
97 # Wait for the applications started in background
100 stop_lttng_tracing_ok
$SESSION_NAME
101 destroy_lttng_session_ok
$SESSION_NAME
103 rm -f ${file_sync_after_first}
104 rm -f ${file_sync_before_last}
106 # Validate test. Expecting all events.
107 trace_match_only
$EVENT_NAME $NR_ITER $TRACE_PATH
108 if [ $?
-ne 0 ]; then
113 function test_log4j_after_start
()
115 diag
"Test LOG4J application AFTER tracing starts"
117 create_lttng_session_ok
$SESSION_NAME $TRACE_PATH
118 enable_log4j_lttng_event
$SESSION_NAME $EVENT_NAME
119 start_lttng_tracing_ok
$SESSION_NAME
121 # Run 5 times with a 1 second delay
124 stop_lttng_tracing_ok
$SESSION_NAME
125 destroy_lttng_session_ok
$SESSION_NAME
127 # Validate test. Expecting all events.
128 trace_match_only
$EVENT_NAME $NR_ITER $TRACE_PATH
129 if [ $?
-ne 0 ]; then
134 function test_log4j_loglevel
()
136 diag
"Test LOG4J application with loglevel"
138 create_lttng_session_ok
$SESSION_NAME $TRACE_PATH
139 enable_log4j_lttng_event_loglevel
$SESSION_NAME $EVENT_NAME "LOG4J_INFO"
140 start_lttng_tracing_ok
$SESSION_NAME
142 # Run 5 times with a 1 second delay
145 stop_lttng_tracing_ok
$SESSION_NAME
146 destroy_lttng_session_ok
$SESSION_NAME
148 # Validate test. Expecting all events.
149 trace_match_only
$EVENT_NAME $NR_ITER $TRACE_PATH
150 if [ $?
-ne 0 ]; then
154 diag
"Test LOG4J applications with lower loglevel"
156 create_lttng_session_ok
$SESSION_NAME $TRACE_PATH
157 enable_log4j_lttng_event_loglevel
$SESSION_NAME $EVENT_NAME "LOG4J_FATAL"
158 start_lttng_tracing_ok
$SESSION_NAME
160 # Run 5 times with a 1 second delay
163 stop_lttng_tracing_ok
$SESSION_NAME
164 destroy_lttng_session_ok
$SESSION_NAME
166 # Validate test. Expecting 0 events.
167 trace_match_only
$EVENT_NAME 0 $TRACE_PATH
168 if [ $?
-ne 0 ]; then
172 diag
"Test LOG4J applications with higher loglevel"
174 create_lttng_session_ok
$SESSION_NAME $TRACE_PATH
175 enable_log4j_lttng_event_loglevel
$SESSION_NAME $EVENT_NAME "LOG4J_TRACE"
176 start_lttng_tracing_ok
$SESSION_NAME
178 # Run 5 times with a 1 second delay
181 stop_lttng_tracing_ok
$SESSION_NAME
182 destroy_lttng_session_ok
$SESSION_NAME
184 # Validate test. Expecting all events.
185 trace_match_only
$EVENT_NAME $NR_ITER $TRACE_PATH
189 function test_log4j_loglevel_multiple
()
191 diag
"Test LOG4J application with multiple loglevel"
193 create_lttng_session_ok
$SESSION_NAME $TRACE_PATH
194 enable_log4j_lttng_event_loglevel
$SESSION_NAME $EVENT_NAME "LOG4J_INFO"
195 enable_log4j_lttng_event_loglevel
$SESSION_NAME $EVENT_NAME "LOG4J_DEBUG"
196 start_lttng_tracing_ok
$SESSION_NAME
198 # Run 5 times with a 1 second delay and fire two TP.
201 stop_lttng_tracing_ok
$SESSION_NAME
202 destroy_lttng_session_ok
$SESSION_NAME
204 # Validate test. Expecting all events times two.
205 trace_match_only
$EVENT_NAME $
(($NR_ITER * 2)) $TRACE_PATH
206 if [ $?
-ne 0 ]; then
210 create_lttng_session_ok
$SESSION_NAME $TRACE_PATH
211 enable_log4j_lttng_event_loglevel
$SESSION_NAME '*' "LOG4J_INFO"
212 enable_log4j_lttng_event_loglevel
$SESSION_NAME '*' "LOG4J_DEBUG"
213 start_lttng_tracing_ok
$SESSION_NAME
215 # Run 5 times with a 1 second delay and fire two TP.
218 stop_lttng_tracing_ok
$SESSION_NAME
219 destroy_lttng_session_ok
$SESSION_NAME
221 # Validate test. Expecting all events times two.
222 trace_match_only
$EVENT_NAME $
(($NR_ITER * 2)) $TRACE_PATH
223 if [ $?
-ne 0 ]; then
228 function test_log4j_multi_session_loglevel
()
230 diag
"Test LOG4J with multiple session"
232 create_lttng_session_ok
$SESSION_NAME-1 $TRACE_PATH/$SESSION_NAME-1
233 enable_log4j_loglevel_only
$SESSION_NAME-1 '*' "LOG4J_INFO"
234 start_lttng_tracing_ok
$SESSION_NAME-1
236 create_lttng_session_ok
$SESSION_NAME-2 $TRACE_PATH/$SESSION_NAME-2
237 enable_log4j_loglevel_only
$SESSION_NAME-2 '*' "LOG4J_DEBUG"
238 start_lttng_tracing_ok
$SESSION_NAME-2
240 # Run 5 times with a 1 second delay and fire second TP.
243 stop_lttng_tracing_ok
$SESSION_NAME-1
244 stop_lttng_tracing_ok
$SESSION_NAME-2
245 destroy_lttng_session_ok
$SESSION_NAME-1
246 destroy_lttng_session_ok
$SESSION_NAME-2
248 # Expecting 6 events being the main event plus the second tp.
249 trace_match_only
$EVENT_NAME $
(($NR_ITER + 1)) $TRACE_PATH/$SESSION_NAME-1
250 if [ $?
-ne 0 ]; then
254 # Expectin 5 events being the debug TP.
255 trace_match_only
$EVENT_NAME $NR_ITER $TRACE_PATH/$SESSION_NAME-2
256 if [ $?
-ne 0 ]; then
261 function test_log4j_multi_session_disable
()
263 diag
"Test LOG4J with multiple session with disabled event"
265 create_lttng_session_ok
$SESSION_NAME-1 $TRACE_PATH/$SESSION_NAME-1
266 enable_log4j_lttng_event
$SESSION_NAME-1 $EVENT_NAME
267 enable_log4j_lttng_event
$SESSION_NAME-1 $EVENT_NAME2
268 disable_log4j_lttng_event
$SESSION_NAME-1 $EVENT_NAME
269 start_lttng_tracing_ok
$SESSION_NAME-1
271 create_lttng_session_ok
$SESSION_NAME-2 $TRACE_PATH/$SESSION_NAME-2
272 enable_log4j_lttng_event
$SESSION_NAME-2 $EVENT_NAME2
273 start_lttng_tracing_ok
$SESSION_NAME-2
275 # Run 5 times with a 1 second delay and fire second TP.
278 stop_lttng_tracing_ok
$SESSION_NAME-1
279 stop_lttng_tracing_ok
$SESSION_NAME-2
280 destroy_lttng_session_ok
$SESSION_NAME-1
281 destroy_lttng_session_ok
$SESSION_NAME-2
283 # Validate test. Expecting one event of the second TP.
284 trace_match_only
$EVENT_NAME2 1 $TRACE_PATH/$SESSION_NAME-1
285 if [ $?
-ne 0 ]; then
289 # Validate test. Expecting one event of the second TP.
290 trace_match_only
$EVENT_NAME2 1 $TRACE_PATH/$SESSION_NAME-2
291 if [ $?
-ne 0 ]; then
296 function test_log4j_multi_session_disable_wildcard
()
298 diag
"Test LOG4J with multiple session with disabled wildcard event"
300 create_lttng_session_ok
$SESSION_NAME-1 $TRACE_PATH/$SESSION_NAME-1
301 enable_log4j_lttng_event
$SESSION_NAME-1 '*'
303 create_lttng_session_ok
$SESSION_NAME-2 $TRACE_PATH/$SESSION_NAME-2
304 enable_log4j_lttng_event
$SESSION_NAME-2 '*'
306 disable_log4j_lttng_event
$SESSION_NAME-1 '*'
308 start_lttng_tracing_ok
$SESSION_NAME-1
309 start_lttng_tracing_ok
$SESSION_NAME-2
313 stop_lttng_tracing_ok
$SESSION_NAME-1
314 stop_lttng_tracing_ok
$SESSION_NAME-2
315 destroy_lttng_session_ok
$SESSION_NAME-1
316 destroy_lttng_session_ok
$SESSION_NAME-2
318 # Validate test. Expecting NO event of the first TP.
319 trace_match_only
$EVENT_NAME 0 $TRACE_PATH/$SESSION_NAME-1
320 if [ $?
-ne 0 ]; then
324 # Validate test. Expecting all events of the first TP.
325 trace_match_only
$EVENT_NAME $NR_ITER $TRACE_PATH/$SESSION_NAME-2
326 if [ $?
-ne 0 ]; then
331 function test_log4j_multi_session_disable_wildcard_begin
()
334 diag
"Test LOG4J with multiple session with disabled wildcard (at the beginning) event"
336 create_lttng_session_ok
$SESSION_NAME-1 $TRACE_PATH/$SESSION_NAME-1
337 enable_log4j_lttng_event
$SESSION_NAME-1 "$ev_name"
339 create_lttng_session_ok
$SESSION_NAME-2 $TRACE_PATH/$SESSION_NAME-2
340 enable_log4j_lttng_event
$SESSION_NAME-2 "$ev_name"
342 disable_log4j_lttng_event
$SESSION_NAME-1 "$ev_name"
344 start_lttng_tracing_ok
$SESSION_NAME-1
345 start_lttng_tracing_ok
$SESSION_NAME-2
349 stop_lttng_tracing_ok
$SESSION_NAME-1
350 stop_lttng_tracing_ok
$SESSION_NAME-2
351 destroy_lttng_session_ok
$SESSION_NAME-1
352 destroy_lttng_session_ok
$SESSION_NAME-2
354 # Validate test. Expecting NO event of the first TP.
355 trace_match_only
$EVENT_NAME 0 $TRACE_PATH/$SESSION_NAME-1
356 if [ $?
-ne 0 ]; then
360 # Validate test. Expecting all events of the first TP.
361 trace_match_only
$EVENT_NAME $NR_ITER $TRACE_PATH/$SESSION_NAME-2
362 if [ $?
-ne 0 ]; then
367 function test_log4j_multi_session_disable_wildcard_middle
()
370 diag
"Test LOG4J with multiple session with disabled wildcard (at the middle) event"
372 create_lttng_session_ok
$SESSION_NAME-1 $TRACE_PATH/$SESSION_NAME-1
373 enable_log4j_lttng_event
$SESSION_NAME-1 "$ev_name"
375 create_lttng_session_ok
$SESSION_NAME-2 $TRACE_PATH/$SESSION_NAME-2
376 enable_log4j_lttng_event
$SESSION_NAME-2 "$ev_name"
378 disable_log4j_lttng_event
$SESSION_NAME-1 "$ev_name"
380 start_lttng_tracing_ok
$SESSION_NAME-1
381 start_lttng_tracing_ok
$SESSION_NAME-2
385 stop_lttng_tracing_ok
$SESSION_NAME-1
386 stop_lttng_tracing_ok
$SESSION_NAME-2
387 destroy_lttng_session_ok
$SESSION_NAME-1
388 destroy_lttng_session_ok
$SESSION_NAME-2
390 # Validate test. Expecting NO event of the first TP.
391 trace_match_only
$EVENT_NAME 0 $TRACE_PATH/$SESSION_NAME-1
392 if [ $?
-ne 0 ]; then
396 # Validate test. Expecting all events of the first TP.
397 trace_match_only
$EVENT_NAME $NR_ITER $TRACE_PATH/$SESSION_NAME-2
398 if [ $?
-ne 0 ]; then
403 function test_log4j_multi_session_disable_wildcard_end
()
406 diag
"Test LOG4J with multiple session with disabled wildcard (at the end) event"
408 create_lttng_session_ok
$SESSION_NAME-1 $TRACE_PATH/$SESSION_NAME-1
409 enable_log4j_lttng_event
$SESSION_NAME-1 "$ev_name"
411 create_lttng_session_ok
$SESSION_NAME-2 $TRACE_PATH/$SESSION_NAME-2
412 enable_log4j_lttng_event
$SESSION_NAME-2 "$ev_name"
414 disable_log4j_lttng_event
$SESSION_NAME-1 "$ev_name"
416 start_lttng_tracing_ok
$SESSION_NAME-1
417 start_lttng_tracing_ok
$SESSION_NAME-2
421 stop_lttng_tracing_ok
$SESSION_NAME-1
422 stop_lttng_tracing_ok
$SESSION_NAME-2
423 destroy_lttng_session_ok
$SESSION_NAME-1
424 destroy_lttng_session_ok
$SESSION_NAME-2
426 # Validate test. Expecting NO event of the first TP.
427 trace_match_only
$EVENT_NAME 0 $TRACE_PATH/$SESSION_NAME-1
428 if [ $?
-ne 0 ]; then
432 # Validate test. Expecting all events of the first TP.
433 trace_matches
$EVENT_NAME $
(( $NR_ITER + 1 )) $TRACE_PATH/$SESSION_NAME-2
434 if [ $?
-ne 0 ]; then
438 trace_matches
$EVENT_NAME2 1 $TRACE_PATH/$SESSION_NAME-2
439 if [ $?
-ne 0 ]; then
444 function test_log4j_disable_all
()
446 diag
"Test LOG4J with multiple session with disabled all event"
448 create_lttng_session_ok
$SESSION_NAME $TRACE_PATH/$SESSION_NAME
449 enable_log4j_lttng_event
$SESSION_NAME '*'
450 enable_log4j_lttng_event
$SESSION_NAME $EVENT_NAME
451 enable_log4j_lttng_event
$SESSION_NAME $EVENT_NAME2
453 disable_log4j_lttng_event
$SESSION_NAME -a
455 start_lttng_tracing_ok
$SESSION_NAME
459 stop_lttng_tracing_ok
$SESSION_NAME
460 destroy_lttng_session_ok
$SESSION_NAME
462 # Validate test. Expecting NO event of the first TP and second TP.
463 trace_match_only
$EVENT_NAME 0 $TRACE_PATH/$SESSION_NAME
464 trace_match_only
$EVENT_NAME2 0 $TRACE_PATH/$SESSION_NAME
465 if [ $?
-ne 0 ]; then
470 function test_log4j_multi_session
()
472 diag
"Test LOG4J with multiple session"
474 create_lttng_session_ok
$SESSION_NAME-1 $TRACE_PATH/$SESSION_NAME-1
475 enable_log4j_lttng_event
$SESSION_NAME-1 $EVENT_NAME
476 start_lttng_tracing_ok
$SESSION_NAME-1
478 create_lttng_session_ok
$SESSION_NAME-2 $TRACE_PATH/$SESSION_NAME-2
479 enable_log4j_lttng_event
$SESSION_NAME-2 $EVENT_NAME2
480 start_lttng_tracing_ok
$SESSION_NAME-2
482 # Run 5 times with a 1 second delay and fire second TP.
485 stop_lttng_tracing_ok
$SESSION_NAME-1
486 stop_lttng_tracing_ok
$SESSION_NAME-2
487 destroy_lttng_session_ok
$SESSION_NAME-1
488 destroy_lttng_session_ok
$SESSION_NAME-2
490 # Validate test. Expecting all events of first TP
491 trace_match_only
$EVENT_NAME $NR_ITER $TRACE_PATH/$SESSION_NAME-1
492 if [ $?
-ne 0 ]; then
496 # Validate test. Expecting one event of the second TP.
497 trace_match_only
$EVENT_NAME2 1 $TRACE_PATH/$SESSION_NAME-2
498 if [ $?
-ne 0 ]; then
503 function test_log4j_destroy_session
()
505 diag
"Test LOG4J two session with destroy"
507 create_lttng_session_ok
$SESSION_NAME $TRACE_PATH/first-sess
508 enable_log4j_lttng_event
$SESSION_NAME $EVENT_NAME
509 start_lttng_tracing_ok
$SESSION_NAME
511 # Run 5 times with a 1 second delay
512 run_app_background
0 1
513 # Wait for the applications started in background
516 stop_lttng_tracing_ok
$SESSION_NAME
517 destroy_lttng_session_ok
$SESSION_NAME
519 # Validate test. Expecting at least one event num 1
520 validate_trace
$EVENT_NAME $TRACE_PATH/first-sess
521 if [ $?
-ne 0 ]; then
525 create_lttng_session_ok
$SESSION_NAME $TRACE_PATH/second-sess
526 enable_log4j_lttng_event
$SESSION_NAME $EVENT_NAME2
527 start_lttng_tracing_ok
$SESSION_NAME
529 # Run 5 times with a 1 second delay
530 run_app_background
0 1
531 # Wait for the applications started in background
534 stop_lttng_tracing_ok
$SESSION_NAME
535 destroy_lttng_session_ok
$SESSION_NAME
537 # Validate test. Expecting only one event num 2
538 trace_match_only
$EVENT_NAME2 1 $TRACE_PATH/second-sess
539 if [ $?
-ne 0 ]; then
544 function test_log4j_filtering
()
546 diag
"Test LOG4J filtering"
548 create_lttng_session_ok
$SESSION_NAME $TRACE_PATH/$SESSION_NAME
549 # Enable all event with a filter.
550 enable_log4j_filter
$SESSION_NAME '*' 'msg == "LOG4J second logger fired"'
551 start_lttng_tracing_ok
$SESSION_NAME
553 # Run 5 times with a 1 second delay and fire second TP.
556 stop_lttng_tracing_ok
$SESSION_NAME
557 destroy_lttng_session_ok
$SESSION_NAME
559 # Validate test. Expecting one event of the second TP only.
560 trace_match_only
$EVENT_NAME2 1 $TRACE_PATH/$SESSION_NAME
561 if [ $?
-ne 0 ]; then
565 create_lttng_session_ok
$SESSION_NAME $TRACE_PATH/$SESSION_NAME
566 # Enable first Logger but filter msg payload for the INFO one while
567 # triggering the debug and second TP.
568 enable_log4j_filter
$SESSION_NAME $EVENT_NAME 'msg == "LOG4J tp fired!"'
569 start_lttng_tracing_ok
$SESSION_NAME
571 # Run 5 times with a 1 second delay, fire debug and second TP.
574 stop_lttng_tracing_ok
$SESSION_NAME
575 destroy_lttng_session_ok
$SESSION_NAME
577 # Validate test. Expecting NR_ITER event of the main INFO tp.
578 trace_match_only
$EVENT_NAME $NR_ITER $TRACE_PATH/$SESSION_NAME
579 if [ $?
-ne 0 ]; then
584 function test_log4j_disable
()
586 diag
"Test LOG4J disable event"
588 create_lttng_session_ok
$SESSION_NAME $TRACE_PATH/$SESSION_NAME
589 # Enable all event with a filter.
590 enable_log4j_lttng_event
$SESSION_NAME $EVENT_NAME
591 enable_log4j_lttng_event
$SESSION_NAME $EVENT_NAME2
592 disable_log4j_lttng_event
$SESSION_NAME $EVENT_NAME
593 start_lttng_tracing_ok
$SESSION_NAME
595 # Run 5 times with a 1 second delay and fire second TP.
598 stop_lttng_tracing_ok
$SESSION_NAME
599 destroy_lttng_session_ok
$SESSION_NAME
601 # Validate test. Expecting one event of the second TP only.
602 trace_match_only
$EVENT_NAME2 1 $TRACE_PATH/$SESSION_NAME
603 if [ $?
-ne 0 ]; then
608 function test_log4j_disable_enable
()
610 diag
"Test LOG4J disable event followed by an enable"
612 create_lttng_session_ok
$SESSION_NAME $TRACE_PATH/$SESSION_NAME
613 # Enable all event with a filter.
614 enable_log4j_lttng_event
$SESSION_NAME $EVENT_NAME
615 disable_log4j_lttng_event
$SESSION_NAME $EVENT_NAME
616 enable_log4j_lttng_event
$SESSION_NAME $EVENT_NAME
617 start_lttng_tracing_ok
$SESSION_NAME
619 # Run 5 times with a 1 second delay and fire second TP.
622 stop_lttng_tracing_ok
$SESSION_NAME
623 destroy_lttng_session_ok
$SESSION_NAME
625 # Validate test. Expecting NR_ITER event of the main INFO tp.
626 trace_match_only
$EVENT_NAME $NR_ITER $TRACE_PATH/$SESSION_NAME
627 if [ $?
-ne 0 ]; then
632 function test_log4j_filter_loglevel
()
634 local BOGUS_EVENT_NAME
="not_a_real_event"
635 local FILTER
="int_loglevel > 700 || int_loglevel < 700"
638 diag
"Test LOG4J a filter with a loglevel"
640 create_lttng_session_ok
$SESSION_NAME $TRACE_PATH/$SESSION_NAME
641 # Enable an event with a filter and the loglevel-only option.
642 enable_log4j_filter_loglevel_only
$SESSION_NAME $BOGUS_EVENT_NAME "$FILTER" LOG4J_INFO
643 disable_log4j_lttng_event
$SESSION_NAME $BOGUS_EVENT_NAME
644 enable_log4j_filter_loglevel_only
$SESSION_NAME $BOGUS_EVENT_NAME "$FILTER" LOG4J_INFO
645 start_lttng_tracing_ok
$SESSION_NAME
647 # Run 5 times with a 1 second delay and fire second TP.
650 stop_lttng_tracing_ok
$SESSION_NAME
651 destroy_lttng_session_ok
$SESSION_NAME
653 # Validate test. Expecting no events.
654 trace_match_only
$ALL_EVENTS 0 $TRACE_PATH/$SESSION_NAME
655 if [ $?
-ne 0 ]; then
660 plan_tests
$NUM_TESTS
662 print_test_banner
"$TEST_DESC"
664 bail_out_if_no_babeltrace
666 if [ ! -f "$TESTAPP_PATH.class" ]; then
672 skip
$withapp "LOG4J support is needed. Skipping all tests." $NUM_TESTS ||
677 test_log4j_multi_session_disable_wildcard
678 test_log4j_multi_session_disable_wildcard_begin
679 test_log4j_multi_session_disable_wildcard_middle
680 test_log4j_multi_session_disable_wildcard_end
681 test_log4j_multi_session_disable
683 test_log4j_disable_enable
684 test_log4j_disable_all
686 test_log4j_multi_session_loglevel
687 test_log4j_destroy_session
689 test_log4j_loglevel_multiple
690 test_log4j_before_start
691 test_log4j_after_start
692 test_log4j_multi_session
693 test_log4j_filter_loglevel
696 for fct_test
in ${tests[@]};
698 TRACE_PATH
=$
(mktemp
--tmpdir -d tmp.test_java_log4j_trace_path.XXXXXX
)
701 if [ $?
-ne 0 ]; then