Bump URCU dependency to 0.14
[lttng-tools.git] / tests / regression / ust / java-log4j / test_java_log4j
1 #!/bin/bash
2 #
3 # Copyright (C) 2014 David Goulet <dgoulet@efficios.com>
4 #
5 # SPDX-License-Identifier: GPL-2.0-only
6
7 TEST_DESC="Java LOG4J support"
8
9 CURDIR=$(dirname "$0")/
10 TESTDIR=$CURDIR/../../..
11
12 NR_ITER=6
13 NR_MSEC_WAIT=100
14
15 TESTAPP_NAME="JTestLTTngLog4j"
16 TESTAPP_PATH="$CURDIR/$TESTAPP_NAME"
17
18 SESSION_NAME="log4j"
19 EVENT_NAME="log4j-event"
20 EVENT_NAME2="log4j-event-2"
21
22 JAVA_CP="$CURDIR:$CLASSPATH"
23
24 NUM_TESTS=196
25
26 # shellcheck source=../../../utils/utils.sh
27 source "$TESTDIR/utils/utils.sh"
28
29 function run_app
30 {
31 local debug_tp=$1
32 local fire_second_tp=$2
33
34 if [ "$debug_tp" = "" ]; then
35 debug_tp=0
36 fi
37
38 if [ "$fire_second_tp" = "" ]; then
39 fire_second_tp=0
40 fi
41
42 # FIXME: test app should have synchro.
43 diag "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"
44 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" >"$OUTPUT_DEST" 2>"$ERROR_OUTPUT_DEST"
45 }
46
47 function run_app_background
48 {
49 run_app "${@}" &
50 }
51
52
53 # MUST set TESTDIR before calling those functions
54
55 function test_log4j_before_start ()
56 {
57 local file_sync_after_first
58 local file_sync_before_last
59
60 file_sync_after_first=$(mktemp --tmpdir -u "tmp.${FUNCNAME[0]}_sync_after_first.XXXXXX")
61 file_sync_before_last=$(mktemp --tmpdir -u "tmp.${FUNCNAME[0]}_sync_before_last.XXXXXX")
62
63 diag "Test LOG4J application BEFORE tracing starts"
64 create_lttng_session_ok $SESSION_NAME "$TRACE_PATH"
65 enable_log4j_lttng_event $SESSION_NAME $EVENT_NAME
66
67 # Run 5 times with a 1 second delay
68 run_app_background
69
70 start_lttng_tracing_ok $SESSION_NAME
71
72 touch "${file_sync_before_last}"
73
74 # Wait for the applications started in background
75 wait
76
77 stop_lttng_tracing_ok $SESSION_NAME
78 destroy_lttng_session_ok $SESSION_NAME
79
80 rm -f "${file_sync_after_first}"
81 rm -f "${file_sync_before_last}"
82
83 # Validate test. Expecting all events.
84 trace_match_only $EVENT_NAME $NR_ITER "$TRACE_PATH"
85 }
86
87 function test_log4j_after_start ()
88 {
89 diag "Test LOG4J application AFTER tracing starts"
90
91 create_lttng_session_ok $SESSION_NAME "$TRACE_PATH"
92 enable_log4j_lttng_event $SESSION_NAME $EVENT_NAME
93 start_lttng_tracing_ok $SESSION_NAME
94
95 # Run 5 times with a 1 second delay
96 run_app
97
98 stop_lttng_tracing_ok $SESSION_NAME
99 destroy_lttng_session_ok $SESSION_NAME
100
101 # Validate test. Expecting all events.
102 trace_match_only $EVENT_NAME $NR_ITER "$TRACE_PATH"
103 }
104
105 function test_log4j_loglevel ()
106 {
107 diag "Test LOG4J application with loglevel"
108
109 create_lttng_session_ok $SESSION_NAME "$TRACE_PATH"
110 enable_log4j_lttng_event_loglevel $SESSION_NAME $EVENT_NAME "LOG4J_INFO"
111 start_lttng_tracing_ok $SESSION_NAME
112
113 # Run 5 times with a 1 second delay
114 run_app
115
116 stop_lttng_tracing_ok $SESSION_NAME
117 destroy_lttng_session_ok $SESSION_NAME
118
119 # Validate test. Expecting all events.
120 trace_match_only $EVENT_NAME $NR_ITER "$TRACE_PATH"
121
122 diag "Test LOG4J applications with lower loglevel"
123
124 create_lttng_session_ok $SESSION_NAME "$TRACE_PATH"
125 enable_log4j_lttng_event_loglevel $SESSION_NAME $EVENT_NAME "LOG4J_FATAL"
126 start_lttng_tracing_ok $SESSION_NAME
127
128 # Run 5 times with a 1 second delay
129 run_app
130
131 stop_lttng_tracing_ok $SESSION_NAME
132 destroy_lttng_session_ok $SESSION_NAME
133
134 # Validate test. Expecting 0 events.
135 trace_match_only $EVENT_NAME 0 "$TRACE_PATH"
136
137 diag "Test LOG4J applications with higher loglevel"
138
139 create_lttng_session_ok $SESSION_NAME "$TRACE_PATH"
140 enable_log4j_lttng_event_loglevel $SESSION_NAME $EVENT_NAME "LOG4J_TRACE"
141 start_lttng_tracing_ok $SESSION_NAME
142
143 # Run 5 times with a 1 second delay
144 run_app
145
146 stop_lttng_tracing_ok $SESSION_NAME
147 destroy_lttng_session_ok $SESSION_NAME
148
149 # Validate test. Expecting all events.
150 trace_match_only $EVENT_NAME $NR_ITER "$TRACE_PATH"
151 }
152
153 function test_log4j_loglevel_multiple ()
154 {
155 diag "Test LOG4J application with multiple loglevel"
156
157 create_lttng_session_ok $SESSION_NAME "$TRACE_PATH"
158 enable_log4j_lttng_event_loglevel $SESSION_NAME $EVENT_NAME "LOG4J_INFO"
159 enable_log4j_lttng_event_loglevel $SESSION_NAME $EVENT_NAME "LOG4J_DEBUG"
160 start_lttng_tracing_ok $SESSION_NAME
161
162 # Run 5 times with a 1 second delay and fire two TP.
163 run_app 1
164
165 stop_lttng_tracing_ok $SESSION_NAME
166 destroy_lttng_session_ok $SESSION_NAME
167
168 # Validate test. Expecting all events times two.
169 trace_match_only $EVENT_NAME $((NR_ITER * 2)) "$TRACE_PATH"
170
171 create_lttng_session_ok $SESSION_NAME "$TRACE_PATH"
172 enable_log4j_lttng_event_loglevel $SESSION_NAME '*' "LOG4J_INFO"
173 enable_log4j_lttng_event_loglevel $SESSION_NAME '*' "LOG4J_DEBUG"
174 start_lttng_tracing_ok $SESSION_NAME
175
176 # Run 5 times with a 1 second delay and fire two TP.
177 run_app 1
178
179 stop_lttng_tracing_ok $SESSION_NAME
180 destroy_lttng_session_ok $SESSION_NAME
181
182 # Validate test. Expecting all events times two.
183 trace_match_only $EVENT_NAME $((NR_ITER * 2)) "$TRACE_PATH"
184 }
185
186 function test_log4j_multi_session_loglevel()
187 {
188 diag "Test LOG4J with multiple session"
189
190 create_lttng_session_ok $SESSION_NAME-1 "$TRACE_PATH"/$SESSION_NAME-1
191 enable_log4j_lttng_event_loglevel_only $SESSION_NAME-1 '*' "LOG4J_INFO"
192 start_lttng_tracing_ok $SESSION_NAME-1
193
194 create_lttng_session_ok $SESSION_NAME-2 "$TRACE_PATH"/$SESSION_NAME-2
195 enable_log4j_lttng_event_loglevel_only $SESSION_NAME-2 '*' "LOG4J_DEBUG"
196 start_lttng_tracing_ok $SESSION_NAME-2
197
198 # Run 5 times with a 1 second delay and fire second TP.
199 run_app 1 1
200
201 stop_lttng_tracing_ok $SESSION_NAME-1
202 stop_lttng_tracing_ok $SESSION_NAME-2
203 destroy_lttng_session_ok $SESSION_NAME-1
204 destroy_lttng_session_ok $SESSION_NAME-2
205
206 # Expecting 6 events being the main event plus the second tp.
207 trace_match_only $EVENT_NAME $((NR_ITER + 1)) "$TRACE_PATH"/$SESSION_NAME-1
208
209 # Expectin 5 events being the debug TP.
210 trace_match_only $EVENT_NAME $NR_ITER "$TRACE_PATH"/$SESSION_NAME-2
211 }
212
213 function test_log4j_multi_session_disable()
214 {
215 diag "Test LOG4J with multiple session with disabled event"
216
217 create_lttng_session_ok $SESSION_NAME-1 "$TRACE_PATH"/$SESSION_NAME-1
218 enable_log4j_lttng_event $SESSION_NAME-1 $EVENT_NAME
219 enable_log4j_lttng_event $SESSION_NAME-1 $EVENT_NAME2
220 disable_log4j_lttng_event $SESSION_NAME-1 $EVENT_NAME
221 start_lttng_tracing_ok $SESSION_NAME-1
222
223 create_lttng_session_ok $SESSION_NAME-2 "$TRACE_PATH"/$SESSION_NAME-2
224 enable_log4j_lttng_event $SESSION_NAME-2 $EVENT_NAME2
225 start_lttng_tracing_ok $SESSION_NAME-2
226
227 # Run 5 times with a 1 second delay and fire second TP.
228 run_app 0 1
229
230 stop_lttng_tracing_ok $SESSION_NAME-1
231 stop_lttng_tracing_ok $SESSION_NAME-2
232 destroy_lttng_session_ok $SESSION_NAME-1
233 destroy_lttng_session_ok $SESSION_NAME-2
234
235 # Validate test. Expecting one event of the second TP.
236 trace_match_only $EVENT_NAME2 1 "$TRACE_PATH"/$SESSION_NAME-1
237
238 # Validate test. Expecting one event of the second TP.
239 trace_match_only $EVENT_NAME2 1 "$TRACE_PATH"/$SESSION_NAME-2
240 }
241
242 function test_log4j_multi_session_disable_wildcard()
243 {
244 diag "Test LOG4J with multiple session with disabled wildcard event"
245
246 create_lttng_session_ok $SESSION_NAME-1 "$TRACE_PATH"/$SESSION_NAME-1
247 enable_log4j_lttng_event $SESSION_NAME-1 '*'
248
249 create_lttng_session_ok $SESSION_NAME-2 "$TRACE_PATH"/$SESSION_NAME-2
250 enable_log4j_lttng_event $SESSION_NAME-2 '*'
251
252 disable_log4j_lttng_event $SESSION_NAME-1 '*'
253
254 start_lttng_tracing_ok $SESSION_NAME-1
255 start_lttng_tracing_ok $SESSION_NAME-2
256
257 run_app
258
259 stop_lttng_tracing_ok $SESSION_NAME-1
260 stop_lttng_tracing_ok $SESSION_NAME-2
261 destroy_lttng_session_ok $SESSION_NAME-1
262 destroy_lttng_session_ok $SESSION_NAME-2
263
264 # Validate test. Expecting NO event of the first TP.
265 trace_match_only $EVENT_NAME 0 "$TRACE_PATH"/$SESSION_NAME-1
266
267 # Validate test. Expecting all events of the first TP.
268 trace_match_only $EVENT_NAME $NR_ITER "$TRACE_PATH"/$SESSION_NAME-2
269 }
270
271 function test_log4j_multi_session_disable_wildcard_begin()
272 {
273 ev_name='*-event'
274 diag "Test LOG4J with multiple session with disabled wildcard (at the beginning) event"
275
276 create_lttng_session_ok $SESSION_NAME-1 "$TRACE_PATH"/$SESSION_NAME-1
277 enable_log4j_lttng_event $SESSION_NAME-1 "$ev_name"
278
279 create_lttng_session_ok $SESSION_NAME-2 "$TRACE_PATH"/$SESSION_NAME-2
280 enable_log4j_lttng_event $SESSION_NAME-2 "$ev_name"
281
282 disable_log4j_lttng_event $SESSION_NAME-1 "$ev_name"
283
284 start_lttng_tracing_ok $SESSION_NAME-1
285 start_lttng_tracing_ok $SESSION_NAME-2
286
287 run_app 0 1
288
289 stop_lttng_tracing_ok $SESSION_NAME-1
290 stop_lttng_tracing_ok $SESSION_NAME-2
291 destroy_lttng_session_ok $SESSION_NAME-1
292 destroy_lttng_session_ok $SESSION_NAME-2
293
294 # Validate test. Expecting NO event of the first TP.
295 trace_match_only $EVENT_NAME 0 "$TRACE_PATH"/$SESSION_NAME-1
296
297 # Validate test. Expecting all events of the first TP.
298 trace_match_only $EVENT_NAME $NR_ITER "$TRACE_PATH"/$SESSION_NAME-2
299 }
300
301 function test_log4j_multi_session_disable_wildcard_middle()
302 {
303 ev_name='log*nt'
304 diag "Test LOG4J with multiple session with disabled wildcard (at the middle) event"
305
306 create_lttng_session_ok $SESSION_NAME-1 "$TRACE_PATH"/$SESSION_NAME-1
307 enable_log4j_lttng_event $SESSION_NAME-1 "$ev_name"
308
309 create_lttng_session_ok $SESSION_NAME-2 "$TRACE_PATH"/$SESSION_NAME-2
310 enable_log4j_lttng_event $SESSION_NAME-2 "$ev_name"
311
312 disable_log4j_lttng_event $SESSION_NAME-1 "$ev_name"
313
314 start_lttng_tracing_ok $SESSION_NAME-1
315 start_lttng_tracing_ok $SESSION_NAME-2
316
317 run_app 0 1
318
319 stop_lttng_tracing_ok $SESSION_NAME-1
320 stop_lttng_tracing_ok $SESSION_NAME-2
321 destroy_lttng_session_ok $SESSION_NAME-1
322 destroy_lttng_session_ok $SESSION_NAME-2
323
324 # Validate test. Expecting NO event of the first TP.
325 trace_match_only $EVENT_NAME 0 "$TRACE_PATH"/$SESSION_NAME-1
326
327 # Validate test. Expecting all events of the first TP.
328 trace_match_only $EVENT_NAME $NR_ITER "$TRACE_PATH"/$SESSION_NAME-2
329 }
330
331 function test_log4j_multi_session_disable_wildcard_end()
332 {
333 ev_name='log4j-ev*'
334 diag "Test LOG4J with multiple session with disabled wildcard (at the end) event"
335
336 create_lttng_session_ok $SESSION_NAME-1 "$TRACE_PATH"/$SESSION_NAME-1
337 enable_log4j_lttng_event $SESSION_NAME-1 "$ev_name"
338
339 create_lttng_session_ok $SESSION_NAME-2 "$TRACE_PATH"/$SESSION_NAME-2
340 enable_log4j_lttng_event $SESSION_NAME-2 "$ev_name"
341
342 disable_log4j_lttng_event $SESSION_NAME-1 "$ev_name"
343
344 start_lttng_tracing_ok $SESSION_NAME-1
345 start_lttng_tracing_ok $SESSION_NAME-2
346
347 run_app 0 1
348
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
353
354 # Validate test. Expecting NO event of the first TP.
355 trace_match_only $EVENT_NAME 0 "$TRACE_PATH"/$SESSION_NAME-1
356
357 # Validate test. Expecting all events of the first TP.
358 trace_matches $EVENT_NAME $(( NR_ITER + 1 )) "$TRACE_PATH"/$SESSION_NAME-2
359
360 trace_matches $EVENT_NAME2 1 "$TRACE_PATH"/$SESSION_NAME-2
361 }
362
363 function test_log4j_disable_all()
364 {
365 diag "Test LOG4J with multiple session with disabled all event"
366
367 create_lttng_session_ok $SESSION_NAME "$TRACE_PATH"/$SESSION_NAME
368 enable_log4j_lttng_event $SESSION_NAME '*'
369 enable_log4j_lttng_event $SESSION_NAME $EVENT_NAME
370 enable_log4j_lttng_event $SESSION_NAME $EVENT_NAME2
371
372 disable_log4j_lttng_event $SESSION_NAME -a
373
374 start_lttng_tracing_ok $SESSION_NAME
375
376 run_app 0 1
377
378 stop_lttng_tracing_ok $SESSION_NAME
379 destroy_lttng_session_ok $SESSION_NAME
380
381 # Validate test. Expecting NO event of the first TP and second TP.
382 trace_match_only $EVENT_NAME 0 "$TRACE_PATH"/$SESSION_NAME
383 trace_match_only $EVENT_NAME2 0 "$TRACE_PATH"/$SESSION_NAME
384 }
385
386 function test_log4j_multi_session()
387 {
388 diag "Test LOG4J with multiple session"
389
390 create_lttng_session_ok $SESSION_NAME-1 "$TRACE_PATH"/$SESSION_NAME-1
391 enable_log4j_lttng_event $SESSION_NAME-1 $EVENT_NAME
392 start_lttng_tracing_ok $SESSION_NAME-1
393
394 create_lttng_session_ok $SESSION_NAME-2 "$TRACE_PATH"/$SESSION_NAME-2
395 enable_log4j_lttng_event $SESSION_NAME-2 $EVENT_NAME2
396 start_lttng_tracing_ok $SESSION_NAME-2
397
398 # Run 5 times with a 1 second delay and fire second TP.
399 run_app 0 1
400
401 stop_lttng_tracing_ok $SESSION_NAME-1
402 stop_lttng_tracing_ok $SESSION_NAME-2
403 destroy_lttng_session_ok $SESSION_NAME-1
404 destroy_lttng_session_ok $SESSION_NAME-2
405
406 # Validate test. Expecting all events of first TP
407 trace_match_only $EVENT_NAME $NR_ITER "$TRACE_PATH"/$SESSION_NAME-1
408
409 # Validate test. Expecting one event of the second TP.
410 trace_match_only $EVENT_NAME2 1 "$TRACE_PATH"/$SESSION_NAME-2
411 }
412
413 function test_log4j_destroy_session()
414 {
415 diag "Test LOG4J two session with destroy"
416
417 create_lttng_session_ok $SESSION_NAME "$TRACE_PATH"/first-sess
418 enable_log4j_lttng_event $SESSION_NAME $EVENT_NAME
419 start_lttng_tracing_ok $SESSION_NAME
420
421 # Run 5 times with a 1 second delay
422 run_app_background 0 1
423 # Wait for the applications started in background
424 wait
425
426 stop_lttng_tracing_ok $SESSION_NAME
427 destroy_lttng_session_ok $SESSION_NAME
428
429 # Validate test. Expecting at least one event num 1
430 validate_trace $EVENT_NAME "$TRACE_PATH"/first-sess
431
432 create_lttng_session_ok $SESSION_NAME "$TRACE_PATH"/second-sess
433 enable_log4j_lttng_event $SESSION_NAME $EVENT_NAME2
434 start_lttng_tracing_ok $SESSION_NAME
435
436 # Run 5 times with a 1 second delay
437 run_app_background 0 1
438 # Wait for the applications started in background
439 wait
440
441 stop_lttng_tracing_ok $SESSION_NAME
442 destroy_lttng_session_ok $SESSION_NAME
443
444 # Validate test. Expecting only one event num 2
445 trace_match_only $EVENT_NAME2 1 "$TRACE_PATH"/second-sess
446 }
447
448 function test_log4j_filtering()
449 {
450 diag "Test LOG4J filtering"
451
452 create_lttng_session_ok $SESSION_NAME "$TRACE_PATH"/$SESSION_NAME
453 # Enable all event with a filter.
454 enable_log4j_lttng_event_filter $SESSION_NAME '*' 'msg == "LOG4J second logger fired"'
455 start_lttng_tracing_ok $SESSION_NAME
456
457 # Run 5 times with a 1 second delay and fire second TP.
458 run_app 0 1
459
460 stop_lttng_tracing_ok $SESSION_NAME
461 destroy_lttng_session_ok $SESSION_NAME
462
463 # Validate test. Expecting one event of the second TP only.
464 trace_match_only $EVENT_NAME2 1 "$TRACE_PATH"/$SESSION_NAME
465
466 create_lttng_session_ok $SESSION_NAME "$TRACE_PATH"/$SESSION_NAME
467 # Enable first Logger but filter msg payload for the INFO one while
468 # triggering the debug and second TP.
469 enable_log4j_lttng_event_filter $SESSION_NAME $EVENT_NAME 'msg == "LOG4J tp fired!"'
470 start_lttng_tracing_ok $SESSION_NAME
471
472 # Run 5 times with a 1 second delay, fire debug and second TP.
473 run_app 1 1
474
475 stop_lttng_tracing_ok $SESSION_NAME
476 destroy_lttng_session_ok $SESSION_NAME
477
478 # Validate test. Expecting NR_ITER event of the main INFO tp.
479 trace_match_only $EVENT_NAME $NR_ITER "$TRACE_PATH"/$SESSION_NAME
480 }
481
482 function test_log4j_disable()
483 {
484 diag "Test LOG4J disable event"
485
486 create_lttng_session_ok $SESSION_NAME "$TRACE_PATH"/$SESSION_NAME
487 # Enable all event with a filter.
488 enable_log4j_lttng_event $SESSION_NAME $EVENT_NAME
489 enable_log4j_lttng_event $SESSION_NAME $EVENT_NAME2
490 disable_log4j_lttng_event $SESSION_NAME $EVENT_NAME
491 start_lttng_tracing_ok $SESSION_NAME
492
493 # Run 5 times with a 1 second delay and fire second TP.
494 run_app 0 1
495
496 stop_lttng_tracing_ok $SESSION_NAME
497 destroy_lttng_session_ok $SESSION_NAME
498
499 # Validate test. Expecting one event of the second TP only.
500 trace_match_only $EVENT_NAME2 1 "$TRACE_PATH"/$SESSION_NAME
501 }
502
503 function test_log4j_disable_enable()
504 {
505 diag "Test LOG4J disable event followed by an enable"
506
507 create_lttng_session_ok $SESSION_NAME "$TRACE_PATH"/$SESSION_NAME
508 # Enable all event with a filter.
509 enable_log4j_lttng_event $SESSION_NAME $EVENT_NAME
510 disable_log4j_lttng_event $SESSION_NAME $EVENT_NAME
511 enable_log4j_lttng_event $SESSION_NAME $EVENT_NAME
512 start_lttng_tracing_ok $SESSION_NAME
513
514 # Run 5 times with a 1 second delay and fire second TP.
515 run_app 0 1
516
517 stop_lttng_tracing_ok $SESSION_NAME
518 destroy_lttng_session_ok $SESSION_NAME
519
520 # Validate test. Expecting NR_ITER event of the main INFO tp.
521 trace_match_only $EVENT_NAME $NR_ITER "$TRACE_PATH"/$SESSION_NAME
522 }
523
524 function test_log4j_filter_loglevel()
525 {
526 local BOGUS_EVENT_NAME="not_a_real_event"
527 local FILTER="int_loglevel > 700 || int_loglevel < 700"
528 local ALL_EVENTS="."
529
530 diag "Test LOG4J a filter with a loglevel"
531
532 create_lttng_session_ok $SESSION_NAME "$TRACE_PATH"/$SESSION_NAME
533 # Enable an event with a filter and the loglevel-only option.
534 enable_log4j_lttng_event_filter_loglevel_only $SESSION_NAME $BOGUS_EVENT_NAME "$FILTER" LOG4J_INFO
535 disable_log4j_lttng_event $SESSION_NAME $BOGUS_EVENT_NAME
536 enable_log4j_lttng_event_filter_loglevel_only $SESSION_NAME $BOGUS_EVENT_NAME "$FILTER" LOG4J_INFO
537 start_lttng_tracing_ok $SESSION_NAME
538
539 # Run 5 times with a 1 second delay and fire second TP.
540 run_app 0 1
541
542 stop_lttng_tracing_ok $SESSION_NAME
543 destroy_lttng_session_ok $SESSION_NAME
544
545 # Validate test. Expecting no events.
546 trace_match_only $ALL_EVENTS 0 "$TRACE_PATH"/$SESSION_NAME
547 }
548
549 plan_tests $NUM_TESTS
550
551 print_test_banner "$TEST_DESC"
552
553 bail_out_if_no_babeltrace
554
555 test -f "$TESTAPP_PATH.class"
556 ok $? "Testapp '$TESTAPP_NAME' present"
557
558 start_lttng_sessiond
559
560 tests=(
561 test_log4j_multi_session_disable_wildcard
562 test_log4j_multi_session_disable_wildcard_begin
563 test_log4j_multi_session_disable_wildcard_middle
564 test_log4j_multi_session_disable_wildcard_end
565 test_log4j_multi_session_disable
566 test_log4j_disable
567 test_log4j_disable_enable
568 test_log4j_disable_all
569 test_log4j_filtering
570 test_log4j_multi_session_loglevel
571 test_log4j_destroy_session
572 test_log4j_loglevel
573 test_log4j_loglevel_multiple
574 test_log4j_before_start
575 test_log4j_after_start
576 test_log4j_multi_session
577 test_log4j_filter_loglevel
578 )
579
580 for fct_test in "${tests[@]}";
581 do
582 TRACE_PATH=$(mktemp --tmpdir -d tmp.test_java_log4j_trace_path.XXXXXX)
583
584 ${fct_test}
585
586 rm -rf "$TRACE_PATH"
587 done
588
589 stop_lttng_sessiond
This page took 0.067708 seconds and 4 git commands to generate.