3 # Copyright (C) 2013 Christian Babeux <christian.babeux@efficios.com>
4 # Copyright (C) 2014 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
6 # SPDX-License-Identifier: GPL-2.0-only
8 TEST_DESC
="UST tracer - tracef events"
12 TESTAPP_PATH
="$TESTDIR/utils/testapp"
13 TESTAPP_NAME
="gen-ust-tracef"
14 TESTAPP_BIN
="$TESTAPP_PATH/$TESTAPP_NAME/$TESTAPP_NAME"
16 EVENT_NAME
="lttng_ust_tracef:event"
20 source $TESTDIR/utils
/utils.sh
22 if [ ! -x "$TESTAPP_BIN" ]; then
23 BAIL_OUT
"No UST nevents binary detected."
26 function test_event_tracef
()
28 create_lttng_session_ok
$SESSION_NAME $TRACE_PATH
29 enable_ust_lttng_event_ok
$SESSION_NAME $EVENT_NAME
30 start_lttng_tracing_ok
$SESSION_NAME
32 $TESTAPP_BIN $NR_ITER $NR_USEC_WAIT
33 ok $?
"Traced application stopped."
35 stop_lttng_tracing_ok
$SESSION_NAME
36 destroy_lttng_session_ok
$SESSION_NAME
38 trace_match_only
$EVENT_NAME $NR_ITER $TRACE_PATH
43 # MUST set TESTDIR before calling those functions
46 print_test_banner
"$TEST_DESC"
48 bail_out_if_no_babeltrace
52 TRACE_PATH
=$
(mktemp
--tmpdir -d tmp.test_event_tracef_trace_path.XXXXXX
)
55 if [ $out -ne 0 ]; then