3 # Copyright (C) 2018 Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
5 # SPDX-License-Identifier: LGPL-2.1-only
7 TEST_DESC
="LTTng relayd filesystem grouping - Userspace tracing"
9 CURDIR
=$
(dirname "$0")/
10 TESTDIR
=$CURDIR/..
/..
/..
13 TESTAPP_PATH
="$TESTDIR/utils/testapp"
14 TESTAPP_NAME
="gen-ust-events"
15 TESTAPP_BIN
="$TESTAPP_PATH/$TESTAPP_NAME/$TESTAPP_NAME"
16 EVENT_NAME
="tp:tptest"
17 CHANNEL_NAME
="my_channel"
19 XSD_PATH
=$TESTDIR/..
/src
/common
/mi-lttng-4.0.xsd
21 XML_VALIDATE
="$TESTDIR/regression/tools/mi/validate_xml $XSD_PATH"
22 XML_EXTRACT
="$TESTDIR/regression/tools/mi/extract_xml"
24 XPATH_CMD_OUTPUT
="//lttng:command/lttng:output"
25 XPATH_SESSION
="$XPATH_CMD_OUTPUT/lttng:sessions/lttng:session"
30 source "$TESTDIR/utils/utils.sh"
32 if [ ! -x "$TESTAPP_BIN" ]; then
33 BAIL_OUT
"No UST events binary detected."
36 function get_auto_session_name
()
40 local lttng_bin
=$LTTNG_BIN
42 LTTNG_BIN
="${lttng_bin} --mi xml"
43 OUTPUT_DEST
=$
(mktemp
--tmpdir "tmp.${FUNCNAME[0]}_output.XXXXXX")
46 $XML_VALIDATE "$OUTPUT_DEST"
47 ok $?
"Valid lttng list XML"
49 value
=$
($XML_EXTRACT "$OUTPUT_DEST" ${XPATH_SESSION}/lttng
:name
/text\
(\
))
50 ok $?
"Extraction of session name"
55 # Transfer value to passed arguments
56 eval "$__result='$value'"
59 function test_ust_uid_live
()
61 local session_name
="$1"
63 local is_automatic_session
=false
65 if [ -z "$session_name" ]; then
66 is_automatic_session
=true
69 diag
"Test UST uid buffer live [$grouping][${session_name:-automatic session name}]"
71 create_lttng_session_uri
"$session_name" net
://localhost
--live
72 if [ "$is_automatic_session" = true
]; then
73 get_auto_session_name session_name
76 enable_ust_lttng_channel_ok
"$session_name" "$CHANNEL_NAME" "--buffers-uid"
77 enable_ust_lttng_event_ok
"$session_name" "$EVENT_NAME" "$CHANNEL_NAME"
78 start_lttng_tracing_ok
"$session_name"
80 $TESTAPP_BIN -i $NR_ITER -w $NR_USEC_WAIT
82 stop_lttng_tracing_ok
"$session_name"
83 destroy_lttng_session_ok
"$session_name"
85 if [ "$grouping" = "$GROUP_BY_SESSION" ]; then
86 validate_trace
"$EVENT_NAME" "$TRACE_PATH/$session_name/$HOSTNAME*"
88 validate_trace
"$EVENT_NAME" "$TRACE_PATH/$HOSTNAME/$session_name*"
91 if [ "$grouping" = "$GROUP_BY_SESSION" ]; then
92 rm -rf "${TRACE_PATH:?}/$session_name"
94 rm -rf "${TRACE_PATH:?}/$HOSTNAME"
98 function test_ust_pid_live
()
100 local session_name
="$1"
102 local is_automatic_session
=false
104 if [ -z "$session_name" ]; then
105 is_automatic_session
=true
108 diag
"Test UST pid buffer live [$grouping][${session_name:-automatic session name}]"
110 create_lttng_session_uri
"$session_name" net
://localhost
--live
111 if [ "$is_automatic_session" = true
]; then
112 get_auto_session_name session_name
115 enable_ust_lttng_channel_ok
"$session_name" "$CHANNEL_NAME" "--buffers-pid"
116 enable_ust_lttng_event_ok
"$session_name" "$EVENT_NAME" "$CHANNEL_NAME"
117 start_lttng_tracing_ok
"$session_name"
119 $TESTAPP_BIN -i $NR_ITER -w $NR_USEC_WAIT
121 stop_lttng_tracing_ok
"$session_name"
122 destroy_lttng_session_ok
"$session_name"
124 if [ "$grouping" = "$GROUP_BY_SESSION" ]; then
125 validate_trace
"$EVENT_NAME" "$TRACE_PATH/$session_name/$HOSTNAME*"
127 validate_trace
"$EVENT_NAME" "$TRACE_PATH/$HOSTNAME/$session_name*"
130 if [ "$grouping" = "$GROUP_BY_SESSION" ]; then
131 rm -rf "${TRACE_PATH:?}/$session_name"
133 rm -rf "${TRACE_PATH:?}/$HOSTNAME"
137 function test_ust_uid_live_custom_output
()
139 local session_name
="$1"
141 local custom_output
="my_live_custom_output"
142 local is_automatic_session
=false
144 if [ -z "$session_name" ]; then
145 is_automatic_session
=true
148 diag
"Test UST uid buffer live, custom output [$grouping][${session_name:-automatic session name}]"
150 create_lttng_session_uri
"$session_name" net
://localhost
/$custom_output --live
151 if [ "$is_automatic_session" = true
]; then
152 get_auto_session_name session_name
155 enable_ust_lttng_channel_ok
"$session_name" "$CHANNEL_NAME" "--buffers-uid"
156 enable_ust_lttng_event_ok
"$session_name" "$EVENT_NAME" "$CHANNEL_NAME"
157 start_lttng_tracing_ok
"$session_name"
159 $TESTAPP_BIN -i $NR_ITER -w $NR_USEC_WAIT
161 stop_lttng_tracing_ok
"$session_name"
162 destroy_lttng_session_ok
"$session_name"
164 if [ "$grouping" = "$GROUP_BY_SESSION" ]; then
165 validate_trace
"$EVENT_NAME" "$TRACE_PATH/$session_name/$HOSTNAME-*/$custom_output"
167 validate_trace
"$EVENT_NAME" "$TRACE_PATH/$HOSTNAME/$custom_output"
170 if [ "$grouping" = "$GROUP_BY_SESSION" ]; then
171 rm -rf "${TRACE_PATH:?}/$session_name"
173 rm -rf "${TRACE_PATH:?}/$HOSTNAME"
177 function test_ust_uid_streaming
()
179 local session_name
="$1"
181 local is_automatic_session
=false
183 if [ -z "$session_name" ]; then
184 is_automatic_session
=true
187 diag
"Test UST uid buffer streaming [$grouping][${session_name:-automatic session name}]"
189 create_lttng_session_uri
"$session_name" net
://localhost
190 if [ "$is_automatic_session" = true
]; then
191 get_auto_session_name session_name
194 enable_ust_lttng_channel_ok
"$session_name" "$CHANNEL_NAME" "--buffers-uid"
195 enable_ust_lttng_event_ok
"$session_name" "$EVENT_NAME" "$CHANNEL_NAME"
196 start_lttng_tracing_ok
"$session_name"
198 $TESTAPP_BIN -i $NR_ITER -w $NR_USEC_WAIT
200 stop_lttng_tracing_ok
"$session_name"
201 destroy_lttng_session_ok
"$session_name"
203 if [ "$grouping" = "$GROUP_BY_SESSION" ]; then
204 validate_trace
"$EVENT_NAME" "$TRACE_PATH/$session_name/$HOSTNAME*"
206 validate_trace
"$EVENT_NAME" "$TRACE_PATH/$HOSTNAME/$session_name*"
209 if [ "$grouping" = "$GROUP_BY_SESSION" ]; then
210 rm -rf "${TRACE_PATH:?}/$session_name"
212 rm -rf "${TRACE_PATH:?}/$HOSTNAME"
216 function test_ust_pid_streaming
()
218 local session_name
="$1"
220 local is_automatic_session
=false
222 if [ -z "$session_name" ]; then
223 is_automatic_session
=true
226 diag
"Test UST pid buffer streaming [$grouping][${session_name:-automatic session name}]"
228 create_lttng_session_uri
"$session_name" net
://localhost
229 if [ "$is_automatic_session" = true
]; then
230 get_auto_session_name session_name
233 enable_ust_lttng_channel_ok
"$session_name" "$CHANNEL_NAME" "--buffers-pid"
234 enable_ust_lttng_event_ok
"$session_name" "$EVENT_NAME" "$CHANNEL_NAME"
235 start_lttng_tracing_ok
"$session_name"
237 $TESTAPP_BIN -i $NR_ITER -w $NR_USEC_WAIT
239 stop_lttng_tracing_ok
"$session_name"
240 destroy_lttng_session_ok
"$session_name"
242 if [ "$grouping" = "$GROUP_BY_SESSION" ]; then
243 validate_trace
"$EVENT_NAME" "$TRACE_PATH/$session_name/$HOSTNAME*"
245 validate_trace
"$EVENT_NAME" "$TRACE_PATH/$HOSTNAME/$session_name*"
248 if [ "$grouping" = "$GROUP_BY_SESSION" ]; then
249 rm -rf "${TRACE_PATH:?}/$session_name"
251 rm -rf "${TRACE_PATH:?}/$HOSTNAME"
255 function test_ust_uid_streaming_custom_output
()
257 local session_name
="$1"
259 local custom_output
="custom_second_token"
260 local is_automatic_session
=false
262 if [ -z "$session_name" ]; then
263 is_automatic_session
=true
266 diag
"Test UST uid buffer streaming, custom output [$grouping][${session_name:-automatic session name}]"
268 create_lttng_session_uri
"$session_name" net
://localhost
/$custom_output
269 if [ "$is_automatic_session" = true
]; then
270 get_auto_session_name session_name
273 enable_ust_lttng_channel_ok
"$session_name" "$CHANNEL_NAME" "--buffers-uid"
274 enable_ust_lttng_event_ok
"$session_name" "$EVENT_NAME" "$CHANNEL_NAME"
275 start_lttng_tracing_ok
"$session_name"
277 $TESTAPP_BIN -i $NR_ITER -w $NR_USEC_WAIT
279 stop_lttng_tracing_ok
"$session_name"
280 destroy_lttng_session_ok
"$session_name"
282 if [ "$grouping" = "$GROUP_BY_SESSION" ]; then
283 validate_trace
"$EVENT_NAME" "$TRACE_PATH/$session_name/$HOSTNAME-*/$custom_output"
285 validate_trace
"$EVENT_NAME" "$TRACE_PATH/$HOSTNAME/$custom_output"
288 if [ "$grouping" = "$GROUP_BY_SESSION" ]; then
289 rm -rf "${TRACE_PATH:?}/$session_name"
291 rm -rf "${TRACE_PATH:?}/$HOSTNAME"
295 function test_ust_uid_streaming_rotate
()
297 local session_name
="$1"
299 local is_automatic_session
=false
301 if [ -z "$session_name" ]; then
302 is_automatic_session
=true
305 diag
"Test UST uid buffer rotate [$grouping][${session_name:-automatic session name}]"
307 create_lttng_session_uri
"$session_name" net
://localhost
308 if [ "$is_automatic_session" = true
]; then
309 get_auto_session_name session_name
312 enable_ust_lttng_channel_ok
"$session_name" "$CHANNEL_NAME" "--buffers-uid"
313 enable_ust_lttng_event_ok
"$session_name" "$EVENT_NAME" "$CHANNEL_NAME"
314 start_lttng_tracing_ok
"$session_name"
316 $TESTAPP_BIN -i $NR_ITER -w $NR_USEC_WAIT
317 rotate_session_ok
"$session_name"
319 stop_lttng_tracing_ok
"$session_name"
320 destroy_lttng_session_ok
"$session_name"
322 if [ "$grouping" = "$GROUP_BY_SESSION" ]; then
323 validate_trace
"$EVENT_NAME" "$TRACE_PATH/$session_name/$HOSTNAME*"
325 validate_trace
"$EVENT_NAME" "$TRACE_PATH/$HOSTNAME/$session_name*"
328 if [ "$grouping" = "$GROUP_BY_SESSION" ]; then
329 rm -rf "${TRACE_PATH:?}/$session_name"
331 rm -rf "${TRACE_PATH:?}/$HOSTNAME"
335 function test_ust_uid_streaming_rotate_custom_output
()
337 local session_name
="$1"
339 local custom_output
="rotate_custom_path"
340 local is_automatic_session
=false
342 if [ -z "$session_name" ]; then
343 is_automatic_session
=true
346 diag
"Test UST uid buffer rotate, custom output [$grouping][${session_name:-automatic session name}]"
348 create_lttng_session_uri
"$session_name" net
://localhost
/$custom_output
349 if [ "$is_automatic_session" = true
]; then
350 get_auto_session_name session_name
353 enable_ust_lttng_channel_ok
"$session_name" "$CHANNEL_NAME" "--buffers-uid"
354 enable_ust_lttng_event_ok
"$session_name" "$EVENT_NAME" "$CHANNEL_NAME"
355 start_lttng_tracing_ok
"$session_name"
357 $TESTAPP_BIN -i $NR_ITER -w $NR_USEC_WAIT
358 rotate_session_ok
"$session_name"
361 stop_lttng_tracing_ok
"$session_name"
362 destroy_lttng_session_ok
"$session_name"
364 if [ "$grouping" = "$GROUP_BY_SESSION" ]; then
365 validate_trace
"$EVENT_NAME" "$TRACE_PATH/$session_name/$HOSTNAME-*/$custom_output"
367 validate_trace
"$EVENT_NAME" "$TRACE_PATH/$HOSTNAME/$custom_output"
370 if [ "$grouping" = "$GROUP_BY_SESSION" ]; then
371 rm -rf "${TRACE_PATH:?}/$session_name"
373 rm -rf "${TRACE_PATH:?}/$HOSTNAME"
377 function test_ust_pid_streaming_rotate
()
379 local session_name
="$1"
381 local is_automatic_session
=false
383 if [ -z "$session_name" ]; then
384 is_automatic_session
=true
387 diag
"Test UST pid buffer rotate with session_name [$grouping][${session_name:-automatic session name}]"
389 create_lttng_session_uri
"$session_name" net
://localhost
390 if [ "$is_automatic_session" = true
]; then
391 get_auto_session_name session_name
394 enable_ust_lttng_channel_ok
"$session_name" "$CHANNEL_NAME" "--buffers-pid"
395 enable_ust_lttng_event_ok
"$session_name" "$EVENT_NAME" "$CHANNEL_NAME"
396 start_lttng_tracing_ok
"$session_name"
398 $TESTAPP_BIN -i $NR_ITER -w $NR_USEC_WAIT
399 rotate_session_ok
"$session_name"
401 stop_lttng_tracing_ok
"$session_name"
402 destroy_lttng_session_ok
"$session_name"
404 if [ "$grouping" = "$GROUP_BY_SESSION" ]; then
405 validate_trace
"$EVENT_NAME" "$TRACE_PATH/$session_name/$HOSTNAME*"
407 validate_trace
"$EVENT_NAME" "$TRACE_PATH/$HOSTNAME/$session_name*"
410 if [ "$grouping" = "$GROUP_BY_SESSION" ]; then
411 rm -rf "${TRACE_PATH:?}/$session_name"
413 rm -rf "${TRACE_PATH:?}/$HOSTNAME"
417 function test_ust_uid_streaming_snapshot
()
419 local session_name
="$1"
421 local is_automatic_session
=false
423 if [ -z "$session_name" ]; then
424 is_automatic_session
=true
427 diag
"Test UST uid buffer snapshot streaming using 'create --snapshot' [$grouping][${session_name:-automatic session name}]"
429 create_lttng_session_uri
"$session_name" net
://localhost
--snapshot
430 if [ "$is_automatic_session" = true
]; then
431 get_auto_session_name session_name
434 enable_ust_lttng_channel_ok
"$session_name" "$CHANNEL_NAME" "--buffers-uid"
435 enable_ust_lttng_event_ok
"$session_name" "$EVENT_NAME" "$CHANNEL_NAME"
436 start_lttng_tracing_ok
"$session_name"
438 $TESTAPP_BIN -i $NR_ITER -w $NR_USEC_WAIT
439 lttng_snapshot_record
"$session_name"
441 stop_lttng_tracing_ok
"$session_name"
442 destroy_lttng_session_ok
"$session_name"
444 if [ "$grouping" = "$GROUP_BY_SESSION" ]; then
445 validate_trace
"$EVENT_NAME" "$TRACE_PATH/$session_name/$HOSTNAME*"
447 validate_trace
"$EVENT_NAME" "$TRACE_PATH/$HOSTNAME/$session_name*"
450 if [ "$grouping" = "$GROUP_BY_SESSION" ]; then
451 rm -rf "${TRACE_PATH:?}/$session_name"
453 rm -rf "${TRACE_PATH:?}/$HOSTNAME"
457 function test_ust_pid_streaming_snapshot
()
459 local session_name
="$1"
461 local is_automatic_session
=false
463 local file_sync_after_first
464 local file_sync_before_last
466 file_sync_after_first
=$
(mktemp
--tmpdir -u "tmp.${FUNCNAME[0]}_sync_after_first.XXXXXX")
467 file_sync_before_last
=$
(mktemp
--tmpdir -u "tmp.${FUNCNAME[0]}_sync_before_last.XXXXXX")
469 if [ -z "$session_name" ]; then
470 is_automatic_session
=true
473 diag
"Test UST pid buffer snapshot streaming using 'create --snapshot' [$grouping][${session_name:-automatic session name}]"
475 create_lttng_session_uri
"$session_name" net
://localhost
--snapshot
476 if [ "$is_automatic_session" = true
]; then
477 get_auto_session_name session_name
480 enable_ust_lttng_channel_ok
"$session_name" "$CHANNEL_NAME" "--buffers-pid"
481 enable_ust_lttng_event_ok
"$session_name" "$EVENT_NAME" "$CHANNEL_NAME"
482 start_lttng_tracing_ok
"$session_name"
484 $TESTAPP_BIN -i $NR_ITER -w $NR_USEC_WAIT \
485 --sync-after-first-event "$file_sync_after_first" \
486 --sync-before-last-event "$file_sync_before_last" 2>&1 &
488 while [ ! -f "${file_sync_after_first}" ]; do
492 lttng_snapshot_record
"$session_name"
494 touch "$file_sync_before_last"
497 stop_lttng_tracing_ok
"$session_name"
498 destroy_lttng_session_ok
"$session_name"
500 if [ "$grouping" = "$GROUP_BY_SESSION" ]; then
501 validate_trace
"$EVENT_NAME" "$TRACE_PATH/$session_name/$HOSTNAME-*/snapshot-1*"
503 validate_trace
"$EVENT_NAME" "$TRACE_PATH/$HOSTNAME/$session_name*/snapshot-1*"
506 if [ "$grouping" = "$GROUP_BY_SESSION" ]; then
507 rm -rf "${TRACE_PATH:?}/$session_name"
509 rm -rf "${TRACE_PATH:?}/$HOSTNAME"
512 rm -f "$file_sync_after_first"
513 rm -f "$file_sync_before_last"
516 function test_ust_uid_streaming_snapshot_add_output_default_name
()
518 local session_name
="$1"
520 local is_automatic_session
=false
522 if [ -z "$session_name" ]; then
523 is_automatic_session
=true
526 diag
"Test UST uid buffer snapshot using 'add-output' with default snapshot name [$grouping][${session_name:-automatic session name}]"
528 create_lttng_session_no_output
"$session_name"
529 if [ "$is_automatic_session" = true
]; then
530 get_auto_session_name session_name
533 enable_lttng_mmap_overwrite_ust_channel
"$session_name" "$CHANNEL_NAME"
534 enable_ust_lttng_event_ok
"$session_name" "$EVENT_NAME" "$CHANNEL_NAME"
535 start_lttng_tracing_ok
"$session_name"
537 $TESTAPP_BIN -i $NR_ITER -w $NR_USEC_WAIT
539 lttng_snapshot_add_output_ok
"$session_name" "net://localhost"
540 lttng_snapshot_record
"$session_name"
542 stop_lttng_tracing_ok
"$session_name"
543 destroy_lttng_session_ok
"$session_name"
545 if [ "$grouping" = "$GROUP_BY_SESSION" ]; then
546 validate_trace
"$EVENT_NAME" "$TRACE_PATH/$session_name/$HOSTNAME-*/snapshot-1*"
548 validate_trace
"$EVENT_NAME" "$TRACE_PATH/$HOSTNAME/$session_name*/snapshot-1*"
551 if [ "$grouping" = "$GROUP_BY_SESSION" ]; then
552 rm -rf "${TRACE_PATH:?}/$session_name"
554 rm -rf "${TRACE_PATH:?}/$HOSTNAME"
558 function test_ust_uid_streaming_snapshot_add_output_custom_name
()
560 local session_name
="$1"
562 local snapshot_name
="this_is_my_snapshot"
563 local is_automatic_session
=false
565 if [ -z "$session_name" ]; then
566 is_automatic_session
=true
569 diag
"Test UST uid buffer snapshot using 'add-output' with custom snapshot name [$grouping][${session_name:-automatic session name}]"
571 create_lttng_session_no_output
"$session_name"
572 if [ "$is_automatic_session" = true
]; then
573 get_auto_session_name session_name
576 enable_lttng_mmap_overwrite_ust_channel
"$session_name" "$CHANNEL_NAME"
577 enable_ust_lttng_event_ok
"$session_name" "$EVENT_NAME" "$CHANNEL_NAME"
578 start_lttng_tracing_ok
"$session_name"
580 $TESTAPP_BIN -i $NR_ITER -w $NR_USEC_WAIT
582 lttng_snapshot_add_output_ok
"$session_name" "net://localhost" "-n $snapshot_name"
583 lttng_snapshot_record
"$session_name"
585 stop_lttng_tracing_ok
"$session_name"
586 destroy_lttng_session_ok
"$session_name"
588 # When session name is automatic, the actual directory is "auto", not
590 if [ "$grouping" = "$GROUP_BY_SESSION" ]; then
591 validate_trace
"$EVENT_NAME" "$TRACE_PATH/$session_name/$HOSTNAME-*/$snapshot_name*"
593 validate_trace
"$EVENT_NAME" "$TRACE_PATH/$HOSTNAME/$session_name*/$snapshot_name*"
596 if [ "$grouping" = "$GROUP_BY_SESSION" ]; then
597 rm -rf "${TRACE_PATH:?}/$session_name"
599 rm -rf "${TRACE_PATH:?}/$HOSTNAME"
603 function test_ust_uid_streaming_snapshot_add_output_custom_name_custom_output
()
605 local session_name
="$1"
607 local snapshot_name
="this_is_my_snapshot"
608 local custom_output
="this/is/my/custom/path"
609 local is_automatic_session
=false
611 if [ -z "$session_name" ]; then
612 is_automatic_session
=true
615 diag
"Test UST uid buffer snapshot using 'add-output' with custom snapshot name and custom output path [$grouping][${session_name:-automatic session name}]"
617 create_lttng_session_no_output
"$session_name"
618 if [ "$is_automatic_session" = true
]; then
619 get_auto_session_name session_name
622 enable_lttng_mmap_overwrite_ust_channel
"$session_name" "$CHANNEL_NAME"
623 enable_ust_lttng_event_ok
"$session_name" "$EVENT_NAME" "$CHANNEL_NAME"
624 start_lttng_tracing_ok
"$session_name"
626 $TESTAPP_BIN -i $NR_ITER -w $NR_USEC_WAIT
628 lttng_snapshot_add_output_ok
"$session_name" "net://localhost/$custom_output" "-n $snapshot_name"
629 lttng_snapshot_record
"$session_name"
631 stop_lttng_tracing_ok
"$session_name"
632 destroy_lttng_session_ok
"$session_name"
634 if [ "$grouping" = "$GROUP_BY_SESSION" ]; then
635 validate_trace
"$EVENT_NAME" "$TRACE_PATH/$session_name/$HOSTNAME-*/$custom_output/$snapshot_name*"
637 validate_trace
"$EVENT_NAME" "$TRACE_PATH/$HOSTNAME/$custom_output/$snapshot_name*"
640 if [ "$grouping" = "$GROUP_BY_SESSION" ]; then
641 rm -rf "${TRACE_PATH:?}/$session_name"
643 rm -rf "${TRACE_PATH:?}/$HOSTNAME"
647 plan_tests
$NUM_TESTS
649 print_test_banner
"$TEST_DESC"
655 test_ust_uid_live_custom_output
656 test_ust_uid_streaming
657 test_ust_pid_streaming
658 test_ust_uid_streaming_custom_output
659 test_ust_uid_streaming_rotate
660 test_ust_uid_streaming_rotate_custom_output
661 test_ust_pid_streaming_rotate
662 test_ust_uid_streaming_snapshot
663 test_ust_pid_streaming_snapshot
664 test_ust_uid_streaming_snapshot_add_output_default_name
665 test_ust_uid_streaming_snapshot_add_output_custom_name
666 test_ust_uid_streaming_snapshot_add_output_custom_name_custom_output
669 GROUP_BY_SESSION
="--group-output-by-session"
670 GROUP_BY_HOSTNAME
="--group-output-by-host"
676 for fct_test
in "${tests[@]}";
678 for grouping
in "${grouping_types[@]}";
680 TRACE_PATH
=$
(mktemp
--tmpdir -d tmp.test_relayd_grouping_ust_trace_path.XXXXXX
)
681 # Set the relayd in --group-output-by-session mode
682 start_lttng_relayd
"-o $TRACE_PATH $grouping"
686 # Perform test when session name is generated by the client
687 ${fct_test} "$name" "$grouping"
688 count
=$
(find "$TRACE_PATH/" -maxdepth 1 -mindepth 1 |
wc -l)
689 is
"$count" "0" "LTTng-relayd output directory empty"
691 # Perform test when session name is given
693 ${fct_test} "$name" "$grouping"
694 count
=$
(find "$TRACE_PATH/" -maxdepth 1 -mindepth 1 |
wc -l)
695 is
"$count" "0" "LTTng-relayd output directory empty"