PAGE_SIZE=$(getconf PAGE_SIZE)
TRACE_PATH=$(mktemp -d -t tmp.test_clear_ust_trace_path.XXXXXX)
-source $TESTDIR/utils/utils.sh
+# shellcheck source=../utils/utils.sh
+source "$TESTDIR/utils/utils.sh"
if [ ! -x "$TESTAPP_BIN" ]; then
BAIL_OUT "No UST events binary detected."
--sync-before-last-event-touch ${file_sync_before_last_touch} \
--sync-before-exit ${file_sync_before_exit} \
--sync-before-exit-touch ${file_sync_before_exit_touch} >/dev/null 2>&1 &
+ local app_pid="${!}"
# Continue only when there is only the last event remaining.
while [ ! -f "${file_sync_before_last_touch}" ]; do
# Release the application.
touch ${file_sync_before_exit}
- wait
+ wait "${app_pid}"
destroy_lttng_session_ok $SESSION_NAME
rm -f ${file_sync_before_last}
--tracefile-size=$PAGE_SIZE --tracefile-count=2 --buffers-$buffer_type
enable_ust_lttng_event_ok $SESSION_NAME $EVENT_NAME $channel_name
start_lttng_tracing_ok $SESSION_NAME
- taskset -c 0 $TESTAPP_BIN -i 200000
+ taskset -c "$(get_any_available_cpu)" $TESTAPP_BIN -i 200000
do_clear_session $SESSION_NAME $tracing_active $clear_twice $rotate_before $rotate_after
stop_lttng_tracing_ok $SESSION_NAME
fi
start_lttng_tracing_ok $SESSION_NAME
- taskset -c 0 $TESTAPP_BIN -i 400000
+ taskset -c "$(get_any_available_cpu)" $TESTAPP_BIN -i 400000
stop_lttng_tracing_ok
if [[ $rotate_before -eq 1 ]]; then