3 # Copyright (C) 2019 Jonathan Rajotte-Julien <jonathan.rajotte-julien@efficios.com>
5 # SPDX-License-Identifier: LGPL-2.1-only
7 TEST_DESC
="Clear - UST tracing"
10 TESTDIR
=$CURDIR/..
/..
/..
11 EVENT_NAME
="tp:tptest"
13 TESTAPP_PATH
="$TESTDIR/utils/testapp"
14 TESTAPP_NAME
="gen-ust-events"
15 TESTAPP_BIN
="$TESTAPP_PATH/$TESTAPP_NAME/$TESTAPP_NAME"
19 PAGE_SIZE
=$
(getconf PAGE_SIZE
)
20 TRACE_PATH
=$
(mktemp
-d)
22 source $TESTDIR/utils
/utils.sh
24 if [ ! -x "$TESTAPP_BIN" ]; then
25 BAIL_OUT
"No UST events binary detected."
28 function clean_path
()
36 function cond_start_tracing
()
39 local tracing_active
=$2
41 if [[ $tracing_active -ne 1 ]]; then
42 start_lttng_tracing_ok
$session_name
46 function cond_stop_tracing
()
49 local tracing_active
=$2
51 if [[ $tracing_active -ne 1 ]]; then
52 stop_lttng_tracing_ok
$session_name
56 function do_clear_session
()
59 local tracing_active
=$2
61 local rotate_before
=$4
64 cond_stop_tracing
$session_name $tracing_active
65 if [[ $rotate_before -eq 1 ]]; then
66 rotate_session_ok
$SESSION_NAME
68 lttng_clear_session_ok
$SESSION_NAME
69 if [[ $clear_twice -eq 1 ]]; then
70 lttng_clear_session_ok
$SESSION_NAME
72 if [[ $rotate_after -eq 1 ]]; then
73 if [[ $tracing_active -eq 1 ]]; then
74 rotate_session_ok
$SESSION_NAME
77 rotate_session_fail
$SESSION_NAME
80 cond_start_tracing
$session_name $tracing_active
83 function test_ust_streaming
()
85 local tracing_active
=$1
87 local rotate_before
=$3
90 local local_path
="${TRACE_PATH}/${HOSTNAME}/${SESSION_NAME}*"
91 local channel_name
="chan"
93 diag
"Test ust streaming clear"
94 diag
"Parameters: tracing_active=$tracing_active, clear_twice=$clear_twice, rotate_before=$rotate_before, rotate_after=$rotate_after, buffer_type=$buffer_type"
95 create_lttng_session_uri
$SESSION_NAME net
://localhost
96 enable_ust_lttng_channel_ok
$SESSION_NAME $channel_name --buffers-$buffer_type
97 enable_ust_lttng_event_ok
$SESSION_NAME $EVENT_NAME $channel_name
98 start_lttng_tracing_ok
$SESSION_NAME
100 do_clear_session
$SESSION_NAME $tracing_active $clear_twice $rotate_before $rotate_after
101 stop_lttng_tracing_ok
$SESSION_NAME
103 if [[ $rotate_before -eq 1 ]]; then
104 validate_trace_count
$EVENT_NAME $local_path 10
106 if [[ "$buffer_type" == "uid" ]]; then
107 validate_trace_empty
$local_path
109 validate_directory_empty
$local_path
113 destroy_lttng_session_ok
$SESSION_NAME
116 function test_ust_streaming_rotate_clear
()
118 local tracing_active
=$1
120 local rotate_before
=$3
121 local rotate_after
=$4
123 local local_path
="${TRACE_PATH}/${HOSTNAME}/${SESSION_NAME}*"
124 local channel_name
="chan"
126 diag
"Test ust streaming rotate-clear"
127 diag
"Parameters: tracing_active=$tracing_active, clear_twice=$clear_twice, rotate_before=$rotate_before, rotate_after=$rotate_after, buffer_type=$buffer_type"
128 create_lttng_session_uri
$SESSION_NAME net
://localhost
129 enable_ust_lttng_channel_ok
$SESSION_NAME $channel_name --buffers-$buffer_type
130 enable_ust_lttng_event_ok
$SESSION_NAME $EVENT_NAME $channel_name
131 start_lttng_tracing_ok
$SESSION_NAME
133 rotate_session_ok
$SESSION_NAME
135 do_clear_session
$SESSION_NAME $tracing_active $clear_twice $rotate_before $rotate_after
137 stop_lttng_tracing_ok
$SESSION_NAME
139 if [[ $rotate_before -eq 1 ]]; then
144 validate_trace_count
$EVENT_NAME $local_path $expect_count
146 destroy_lttng_session_ok
$SESSION_NAME
149 function test_ust_streaming_clear_rotate
()
151 local tracing_active
=$1
153 local rotate_before
=$3
154 local rotate_after
=$4
156 local local_path
="${TRACE_PATH}/${HOSTNAME}/${SESSION_NAME}*"
157 local channel_name
="chan"
159 diag
"Test ust streaming clear-rotate"
160 diag
"Parameters: tracing_active=$tracing_active, clear_twice=$clear_twice, rotate_before=$rotate_before, rotate_after=$rotate_after, buffer_type=$buffer_type"
161 create_lttng_session_uri
$SESSION_NAME net
://localhost
162 enable_ust_lttng_channel_ok
$SESSION_NAME $channel_name --buffers-$buffer_type
163 enable_ust_lttng_event_ok
$SESSION_NAME $EVENT_NAME $channel_name
164 start_lttng_tracing_ok
$SESSION_NAME
166 do_clear_session
$SESSION_NAME $tracing_active $clear_twice $rotate_before $rotate_after
168 rotate_session_ok
$SESSION_NAME
170 stop_lttng_tracing_ok
$SESSION_NAME
172 if [[ $rotate_before -eq 1 ]]; then
177 validate_trace_count
$EVENT_NAME $local_path $expect_count
179 destroy_lttng_session_ok
$SESSION_NAME
182 function test_ust_streaming_live
()
184 local tracing_active
=$1
188 local local_path
="${TRACE_PATH}/${HOSTNAME}/${SESSION_NAME}*"
189 local channel_name
="chan"
191 diag
"Test ust streaming live clear"
192 diag
"Parameters: tracing_active=$tracing_active, clear_twice=$clear_twice, buffer_type=$buffer_type"
193 create_lttng_session_uri
$SESSION_NAME net
://localhost
"--live"
194 enable_ust_lttng_channel_ok
$SESSION_NAME $channel_name --buffers-$buffer_type
195 enable_ust_lttng_event_ok
$SESSION_NAME $EVENT_NAME $channel_name
196 start_lttng_tracing_ok
$SESSION_NAME
198 do_clear_session
$SESSION_NAME $tracing_active $clear_twice 0 0
199 stop_lttng_tracing_ok
$SESSION_NAME
201 validate_directory_empty
$local_path
203 destroy_lttng_session_ok
$SESSION_NAME
207 function test_ust_basic_streaming_live_viewer
()
209 local tracing_active
=$1
213 local local_path
="${TRACE_PATH}/${HOSTNAME}/${SESSION_NAME}*"
214 local remote_trace_path
="${HOSTNAME}/${SESSION_NAME}"
215 local channel_name
="chan"
216 local bt_output_path
=$
(mktemp
-u)
217 local file_sync_before_exit
=$
(mktemp
-u)
219 diag
"Test ust basic streaming live with viewer"
220 diag
"Parameters: tracing_active=$tracing_active, clear_twice=$clear_twice, buffer_type=$buffer_type"
221 create_lttng_session_uri
$SESSION_NAME net
://localhost
"--live"
222 enable_ust_lttng_channel_ok
$SESSION_NAME $channel_name --buffers-$buffer_type
223 enable_ust_lttng_event_ok
$SESSION_NAME $EVENT_NAME $channel_name
224 start_lttng_tracing_ok
$SESSION_NAME
226 wait_live_trace_ready net
://localhost
228 # Connect a live viewer
229 $BABELTRACE_BIN -i lttng-live net
://localhost
/host
/$remote_trace_path > $bt_output_path &
232 wait_live_viewer_connect net
://localhost
234 $TESTAPP_BIN -i 10 --sync-before-exit $file_sync_before_exit &
237 diag
"Wait until viewer sees all 10 expected events"
239 while [ $evcount -ne 10 ]; do
240 evcount
=$
(cat $bt_output_path |
wc -l)
243 pass
"Live viewer read $evcount events, expect 10"
245 destroy_lttng_session_ok
$SESSION_NAME
246 touch $file_sync_before_exit
247 diag
"Wait for application to exit"
249 pass
"Wait for application to exit"
250 diag
"Wait for viewer to exit"
252 ok $?
"Babeltrace succeeds"
253 pass
"Wait for viewer to exit"
255 rm -f $bt_output_path
256 rm -f $file_sync_before_exit
259 function test_ust_streaming_live_viewer
()
261 local tracing_active
=$1
265 local local_path
="${TRACE_PATH}/${HOSTNAME}/${SESSION_NAME}*"
266 local remote_trace_path
="${HOSTNAME}/${SESSION_NAME}"
267 local channel_name
="chan"
268 local bt_output_path
=$
(mktemp
-d)/bt-output.txt
270 diag
"Test ust streaming live clear with viewer"
271 diag
"Parameters: tracing_active=$tracing_active, clear_twice=$clear_twice, buffer_type=$buffer_type"
272 create_lttng_session_uri
$SESSION_NAME net
://localhost
"--live"
273 enable_ust_lttng_channel_ok
$SESSION_NAME $channel_name --buffers-$buffer_type
274 enable_ust_lttng_event_ok
$SESSION_NAME $EVENT_NAME $channel_name
275 start_lttng_tracing_ok
$SESSION_NAME
277 wait_live_trace_ready net
://localhost
279 # Connect a live viewer
280 $BABELTRACE_BIN -i lttng-live net
://localhost
/host
/$remote_trace_path > $bt_output_path &
283 wait_live_viewer_connect net
://localhost
286 do_clear_session
$SESSION_NAME $tracing_active $clear_twice 0 0
287 stop_lttng_tracing_ok
$SESSION_NAME
289 destroy_lttng_session_ok
$SESSION_NAME
290 diag
"Wait for viewer to exit"
292 ok $?
"Babeltrace succeeds"
293 pass
"Wait for viewer to exit"
295 clean_path
$bt_output_path
298 function test_ust_local
()
300 local tracing_active
=$1
302 local rotate_before
=$3
303 local rotate_after
=$4
305 local channel_name
="chan"
307 diag
"Test ust local"
308 diag
"Parameters: tracing_active=$tracing_active, clear_twice=$clear_twice, rotate_before=$rotate_before, rotate_after=$rotate_after, buffer_type=$buffer_type"
309 create_lttng_session_ok
$SESSION_NAME $TRACE_PATH
310 enable_ust_lttng_channel_ok
$SESSION_NAME $channel_name --buffers-$buffer_type
311 enable_ust_lttng_event_ok
$SESSION_NAME $EVENT_NAME $channel_name
312 start_lttng_tracing_ok
$SESSION_NAME
314 do_clear_session
$SESSION_NAME $tracing_active $clear_twice $rotate_before $rotate_after
315 stop_lttng_tracing_ok
$SESSION_NAME
317 if [[ $rotate_before -eq 1 ]]; then
318 validate_trace_count
$EVENT_NAME $TRACE_PATH 10
320 if [[ "$buffer_type" == "uid" ]]; then
321 validate_trace_empty
$TRACE_PATH
323 validate_directory_empty
$TRACE_PATH
327 destroy_lttng_session_ok
$SESSION_NAME
330 function test_ust_local_rotate_clear
()
332 local tracing_active
=$1
334 local rotate_before
=$3
335 local rotate_after
=$4
337 local channel_name
="chan"
339 diag
"Test ust local rotate-clear"
340 diag
"Parameters: tracing_active=$tracing_active, clear_twice=$clear_twice, rotate_before=$rotate_before, rotate_after=$rotate_after, buffer_type=$buffer_type"
341 create_lttng_session_ok
$SESSION_NAME $TRACE_PATH
342 enable_ust_lttng_channel_ok
$SESSION_NAME $channel_name --buffers-$buffer_type
343 enable_ust_lttng_event_ok
$SESSION_NAME $EVENT_NAME $channel_name
344 start_lttng_tracing_ok
$SESSION_NAME
346 rotate_session_ok
$SESSION_NAME
348 do_clear_session
$SESSION_NAME $tracing_active $clear_twice $rotate_before $rotate_after
350 stop_lttng_tracing_ok
$SESSION_NAME
352 if [[ $rotate_before -eq 1 ]]; then
357 validate_trace_count
$EVENT_NAME $TRACE_PATH $expect_count
359 destroy_lttng_session_ok
$SESSION_NAME
362 function test_ust_local_clear_rotate
()
364 local tracing_active
=$1
366 local rotate_before
=$3
367 local rotate_after
=$4
369 local channel_name
="chan"
371 diag
"Test ust local clear-rotate"
372 diag
"Parameters: tracing_active=$tracing_active, clear_twice=$clear_twice, rotate_before=$rotate_before, rotate_after=$rotate_after, buffer_type=$buffer_type"
373 create_lttng_session_ok
$SESSION_NAME $TRACE_PATH
374 enable_ust_lttng_channel_ok
$SESSION_NAME $channel_name --buffers-$buffer_type
375 enable_ust_lttng_event_ok
$SESSION_NAME $EVENT_NAME $channel_name
376 start_lttng_tracing_ok
$SESSION_NAME
378 do_clear_session
$SESSION_NAME $tracing_active $clear_twice $rotate_before $rotate_after
380 rotate_session_ok
$SESSION_NAME
382 stop_lttng_tracing_ok
$SESSION_NAME
384 if [[ $rotate_before -eq 1 ]]; then
389 validate_trace_count
$EVENT_NAME $TRACE_PATH $expect_count
391 destroy_lttng_session_ok
$SESSION_NAME
394 function do_ust_snapshot
()
396 local session_name
=$1
398 local tracing_active
=$3
401 local channel_name
="snapshot"
403 enable_ust_lttng_channel_ok
$SESSION_NAME $channel_name --buffers-$buffer_type
404 enable_ust_lttng_event_ok
$session_name $EVENT_NAME $channel_name
405 start_lttng_tracing_ok
$session_name
407 # Generate 10 events that will sit in the buffers.
410 # Take a first snapshot and validate that the events are present.
411 lttng_snapshot_record
$session_name
412 stop_lttng_tracing_ok
$session_name
413 validate_trace_count
$EVENT_NAME $trace_path 10
415 # Clean the output path
416 clean_path
$trace_path
417 start_lttng_tracing_ok
$session_name
419 do_clear_session
$SESSION_NAME $tracing_active $clear_twice 0 0
421 # Make sure the subsequent snapshot is empty and valid.
422 lttng_snapshot_record
$session_name
423 stop_lttng_tracing_ok
$session_name
424 validate_trace_empty
$trace_path
426 # Clean the output path
427 clean_path
$trace_path
428 start_lttng_tracing_ok
$session_name
430 # Make sure that everything still works, generate events and take a
433 lttng_snapshot_record
$session_name
434 stop_lttng_tracing_ok
$session_name
435 validate_trace_count
$EVENT_NAME $trace_path 10
438 function test_ust_streaming_snapshot
()
440 local tracing_active
=$1
445 diag
"Test ust streaming snapshot clear"
446 diag
"Parameters: tracing_active=$tracing_active, clear_twice=$clear_twice, buffer_type=$buffer_type"
448 create_lttng_session_uri
$SESSION_NAME net
://localhost
"--snapshot"
449 do_ust_snapshot
$SESSION_NAME $TRACE_PATH $tracing_active $clear_twice $buffer_type
450 destroy_lttng_session_ok
$SESSION_NAME
453 function test_ust_local_snapshot
()
455 local tracing_active
=$1
460 diag
"Test ust local snapshot clear"
461 diag
"Parameters: tracing_active=$tracing_active, clear_twice=$clear_twice, buffer_type=$buffer_type"
463 create_lttng_session_ok
$SESSION_NAME $TRACE_PATH "--snapshot"
464 do_ust_snapshot
$SESSION_NAME $TRACE_PATH $tracing_active $clear_twice $buffer_type
465 destroy_lttng_session_ok
$SESSION_NAME
468 # snapshot for per-pid is tested independently of the "buffer type" parameter
469 # because an application needs to be live to appear in a snapshot.
470 function test_ust_local_snapshot_per_pid
()
472 local tracing_active
=$1
476 local channel_name
="channel0"
477 local file_sync_before_last
=$
(mktemp
-u)
478 local file_sync_before_last_touch
=$
(mktemp
-u)
479 local file_sync_before_exit
=$
(mktemp
-u)
480 local file_sync_before_exit_touch
=$
(mktemp
-u)
482 diag
"Test ust local snapshot clear per pid"
483 diag
"Parameters: tracing_active=$tracing_active, clear_twice=$clear_twice, buffer_type=$buffer_type"
485 create_lttng_session_ok
$SESSION_NAME $TRACE_PATH "--snapshot"
486 enable_ust_lttng_channel_ok
$SESSION_NAME $channel_name --buffers-$buffer_type
487 enable_ust_lttng_event_ok
$SESSION_NAME $EVENT_NAME $channel_name
488 start_lttng_tracing_ok
$SESSION_NAME
490 # Generate 10 events that will sit in the buffers.
491 $TESTAPP_BIN -i 10 -w 0 \
492 --sync-before-last-event ${file_sync_before_last} \
493 --sync-before-last-event-touch ${file_sync_before_last_touch} \
494 --sync-before-exit ${file_sync_before_exit} \
495 --sync-before-exit-touch ${file_sync_before_exit_touch} >/dev
/null
2>&1 &
497 # Continue only when there is only the last event remaining.
498 while [ ! -f "${file_sync_before_last_touch}" ]; do
502 # Take a first snapshot and validate that the events are present.
503 lttng_snapshot_record
$SESSION_NAME
504 stop_lttng_tracing_ok
$SESSION_NAME
505 validate_trace_count
$EVENT_NAME $TRACE_PATH 9
507 # Clean the output path
508 clean_path
$TRACE_PATH
509 start_lttng_tracing_ok
$SESSION_NAME
511 do_clear_session
$SESSION_NAME $tracing_active $clear_twice 0 0
513 # Make sure the subsequent snapshot is empty and valid.
514 lttng_snapshot_record
$SESSION_NAME
515 stop_lttng_tracing_ok
$SESSION_NAME
516 validate_trace_empty
$TRACE_PATH
518 # Validate that tracing still works and subsequent snapshots are valid.
519 # Clean the output path.
520 clean_path
$TRACE_PATH
521 start_lttng_tracing_ok
$SESSION_NAME
523 # Continue over the last event.
524 touch ${file_sync_before_last}
526 # Wait for the before exit sync point. This ensure that we went over the
528 while [ ! -f "${file_sync_before_exit_touch}" ]; do
532 # Make sure the snapshot contains the last event.
533 lttng_snapshot_record
$SESSION_NAME
534 stop_lttng_tracing_ok
$SESSION_NAME
535 validate_trace_count
$EVENT_NAME $TRACE_PATH 1
537 # Release the application.
538 touch ${file_sync_before_exit}
540 destroy_lttng_session_ok
$SESSION_NAME
542 rm -f ${file_sync_before_last}
543 rm -f ${file_sync_before_last_touch}
544 rm -f ${file_sync_before_exit}
545 rm -f ${file_sync_before_exit_touch}
548 function test_ust_streaming_tracefile_rotation
()
550 local tracing_active
=$1
552 local rotate_before
=$3
553 local rotate_after
=$4
555 local channel_name
="rotchan"
556 local local_path
="${TRACE_PATH}/${HOSTNAME}/${SESSION_NAME}*"
558 diag
"Test ust streaming clear with tracefile rotation"
559 diag
"Parameters: tracing_active=$tracing_active, clear_twice=$clear_twice, rotate_before=$rotate_before, rotate_after=$rotate_after, buffer_type=$buffer_type"
560 create_lttng_session_uri
$SESSION_NAME net
://localhost
561 enable_ust_lttng_channel_ok
$SESSION_NAME $channel_name --subbuf-size=$PAGE_SIZE \
562 --tracefile-size=$PAGE_SIZE --tracefile-count=2 --buffers-$buffer_type
563 enable_ust_lttng_event_ok
$SESSION_NAME $EVENT_NAME $channel_name
564 start_lttng_tracing_ok
$SESSION_NAME
566 do_clear_session
$SESSION_NAME $tracing_active $clear_twice $rotate_before $rotate_after
567 stop_lttng_tracing_ok
$SESSION_NAME
569 if [[ $rotate_before -eq 1 ]]; then
570 validate_trace_count
$EVENT_NAME $local_path 10
572 if [[ "$buffer_type" == "uid" ]]; then
573 validate_trace_empty
$local_path
575 validate_directory_empty
$local_path
579 start_lttng_tracing_ok
$SESSION_NAME
581 stop_lttng_tracing_ok
583 if [[ $rotate_before -eq 1 ]]; then
584 validate_trace_count
$EVENT_NAME $local_path 30
586 validate_trace_count
$EVENT_NAME $local_path 20
589 destroy_lttng_session_ok
$SESSION_NAME
592 # With 1 byte per event (as strict minimum), generating 200000 events
593 # guarantees filling up 2 files of 64k in size, which is the maximum
594 # page size known on Linux
595 function test_ust_streaming_tracefile_rotation_overwrite_files
()
597 local tracing_active
=$1
599 local rotate_before
=$3
600 local rotate_after
=$4
602 local channel_name
="rotchan"
603 local local_path
="${TRACE_PATH}/${HOSTNAME}/${SESSION_NAME}*"
605 diag
"Test ust streaming clear with tracefile rotation, overwrite files"
606 diag
"Parameters: tracing_active=$tracing_active, clear_twice=$clear_twice, rotate_before=$rotate_before, rotate_after=$rotate_after, buffer_type=$buffer_type"
607 create_lttng_session_uri
$SESSION_NAME net
://localhost
608 enable_ust_lttng_channel_ok
$SESSION_NAME $channel_name --subbuf-size=$PAGE_SIZE \
609 --tracefile-size=$PAGE_SIZE --tracefile-count=2 --buffers-$buffer_type
610 enable_ust_lttng_event_ok
$SESSION_NAME $EVENT_NAME $channel_name
611 start_lttng_tracing_ok
$SESSION_NAME
612 taskset
-c 0 $TESTAPP_BIN -i 200000
613 do_clear_session
$SESSION_NAME $tracing_active $clear_twice $rotate_before $rotate_after
614 stop_lttng_tracing_ok
$SESSION_NAME
616 if [[ $rotate_before -eq 1 ]]; then
617 validate_trace_count_range_incl_min_excl_max
$EVENT_NAME $local_path 1 200000
619 if [[ "$buffer_type" == "uid" ]]; then
620 validate_trace_empty
$local_path
622 validate_directory_empty
$local_path
626 start_lttng_tracing_ok
$SESSION_NAME
627 taskset
-c 0 $TESTAPP_BIN -i 400000
628 stop_lttng_tracing_ok
630 if [[ $rotate_before -eq 1 ]]; then
631 validate_trace_count_range_incl_min_excl_max
$EVENT_NAME $local_path 1 600000
633 validate_trace_count_range_incl_min_excl_max
$EVENT_NAME $local_path 1 200000
636 destroy_lttng_session_ok
$SESSION_NAME
639 function test_ust_disallow_clear
()
641 diag
"Test ust disallow clear on relay daemon"
642 SESSION_NAME
=$
(randstring
16 0)
644 LTTNG_RELAYD_DISALLOW_CLEAR
=1 start_lttng_relayd
"-o $TRACE_PATH"
648 create_lttng_session_uri
$SESSION_NAME net
://localhost
649 enable_ust_lttng_event_ok
$SESSION_NAME $EVENT_NAME
650 start_lttng_tracing_ok
$SESSION_NAME
651 lttng_clear_session_fail
$SESSION_NAME
652 destroy_lttng_session_ok
$SESSION_NAME
656 clean_path
$TRACE_PATH
659 plan_tests
$NUM_TESTS
661 print_test_banner
"$TEST_DESC"
663 streaming_tests
=(test_ust_streaming
664 test_ust_streaming_rotate_clear
665 test_ust_streaming_clear_rotate
666 test_ust_streaming_tracefile_rotation
667 test_ust_streaming_tracefile_rotation_overwrite_files
670 live_tests
=(test_ust_streaming_live
671 test_ust_basic_streaming_live_viewer
672 test_ust_streaming_live_viewer
675 local_tests
=(test_ust_local
676 test_ust_local_rotate_clear
677 test_ust_local_clear_rotate
680 snapshot_uid_tests
=(test_ust_streaming_snapshot
681 test_ust_local_snapshot
684 snapshot_pid_tests
=(test_ust_local_snapshot_per_pid
)
686 start_lttng_relayd
"-o $TRACE_PATH"
691 # Clear with tracing active, clear once
692 for fct_test
in ${streaming_tests[@]} ${live_tests[@]} ${local_tests[@]} ${snapshot_uid_tests[@]};
694 SESSION_NAME
=$
(randstring
16 0)
695 ${fct_test} 1 0 0 0 uid
696 clean_path
$TRACE_PATH
699 # Clear with tracing active, clear twice
700 for fct_test
in ${streaming_tests[@]} ${live_tests[@]} ${local_tests[@]} ${snapshot_uid_tests[@]};
702 SESSION_NAME
=$
(randstring
16 0)
703 ${fct_test} 1 1 0 0 uid
704 clean_path
$TRACE_PATH
707 # Clear with tracing inactive, clear once
708 for fct_test
in ${streaming_tests[@]} ${live_tests[@]} ${local_tests[@]} ${snapshot_uid_tests[@]};
710 SESSION_NAME
=$
(randstring
16 0)
711 ${fct_test} 0 0 0 0 uid
712 clean_path
$TRACE_PATH
715 # Clear with tracing inactive, clear twice
716 for fct_test
in ${streaming_tests[@]} ${live_tests[@]} ${local_tests[@]} ${snapshot_uid_tests[@]};
718 SESSION_NAME
=$
(randstring
16 0)
719 ${fct_test} 0 1 0 0 uid
720 clean_path
$TRACE_PATH
723 # Clear with tracing inactive, rotate-clear once
724 for fct_test
in ${streaming_tests[@]} ${local_tests[@]};
726 SESSION_NAME
=$
(randstring
16 0)
727 ${fct_test} 0 0 1 0 uid
728 clean_path
$TRACE_PATH
731 # Clear with tracing inactive, clear once-rotate(fail)
732 for fct_test
in ${streaming_tests[@]} ${local_tests[@]};
734 SESSION_NAME
=$
(randstring
16 0)
735 ${fct_test} 0 0 0 1 uid
736 clean_path
$TRACE_PATH
742 # Clear with tracing active, clear once
743 for fct_test
in ${streaming_tests[@]} ${live_tests[@]} ${local_tests[@]} ${snapshot_pid_tests[@]};
745 SESSION_NAME
=$
(randstring
16 0)
746 ${fct_test} 1 0 0 0 pid
747 clean_path
$TRACE_PATH
750 # Clear with tracing active, clear twice
751 for fct_test
in ${streaming_tests[@]} ${live_tests[@]} ${local_tests[@]} ${snapshot_pid_tests[@]};
753 SESSION_NAME
=$
(randstring
16 0)
754 ${fct_test} 1 1 0 0 pid
755 clean_path
$TRACE_PATH
758 # Clear with tracing inactive, clear once
759 for fct_test
in ${streaming_tests[@]} ${live_tests[@]} ${local_tests[@]} ${snapshot_pid_tests[@]};
761 SESSION_NAME
=$
(randstring
16 0)
762 ${fct_test} 0 0 0 0 pid
763 clean_path
$TRACE_PATH
766 # Clear with tracing inactive, clear twice
767 for fct_test
in ${streaming_tests[@]} ${live_tests[@]} ${local_tests[@]} ${snapshot_pid_tests[@]};
769 SESSION_NAME
=$
(randstring
16 0)
770 ${fct_test} 0 1 0 0 pid
771 clean_path
$TRACE_PATH
774 # Clear with tracing inactive, rotate-clear once
775 for fct_test
in ${streaming_tests[@]} ${local_tests[@]};
777 SESSION_NAME
=$
(randstring
16 0)
778 ${fct_test} 0 0 1 0 pid
779 clean_path
$TRACE_PATH
782 # Clear with tracing inactive, clear once-rotate(fail)
783 for fct_test
in ${streaming_tests[@]} ${local_tests[@]};
785 SESSION_NAME
=$
(randstring
16 0)
786 ${fct_test} 0 0 0 1 pid
787 clean_path
$TRACE_PATH
793 test_ust_disallow_clear