3 # Copyright (C) 2013 Christian Babeux <christian.babeux@efficios.com>
5 # SPDX-License-Identifier: GPL-2.0-only
7 TEST_DESC
="UST tracer - Basic events"
11 BIN_NAME
="gen-ust-events"
12 SESSION_NAME
="valid_filter"
13 EVENT_NAME
="tp:tptest"
18 source $TESTDIR/utils
/utils.sh
20 function test_event_basic
()
22 TRACE_PATH
=$
(mktemp
-d)
23 SESSION_NAME
="ust_event_basic"
24 SESSION_NAME2
="ust_event_basic2"
31 create_lttng_session_ok
$SESSION_NAME $TRACE_PATH
32 create_lttng_session_ok
$SESSION_NAME2 $TRACE_PATH
34 enable_ust_lttng_channel_ok
$SESSION_NAME $CHAN_NAME
35 enable_ust_lttng_channel_ok
$SESSION_NAME2 $CHAN_NAME2
37 enable_ust_lttng_event_ok
$SESSION_NAME $EVENT_NAME $CHAN_NAME
38 enable_ust_lttng_event_ok
$SESSION_NAME $EVENT_NAME2 $CHAN_NAME
39 enable_ust_lttng_event_ok
$SESSION_NAME2 $EVENT_NAME3 $CHAN_NAME2
41 add_context_ust_ok
$SESSION_NAME $CHAN_NAME "vpid"
42 add_context_ust_ok
$SESSION_NAME $CHAN_NAME "vtid"
43 add_context_ust_ok
$SESSION_NAME $CHAN_NAME "pthread_id"
44 add_context_ust_ok
$SESSION_NAME $CHAN_NAME "procname"
45 add_context_ust_ok
$SESSION_NAME2 $CHAN_NAME2 "procname"
47 disable_ust_lttng_event
$SESSION_NAME $EVENT_NAME $CHAN_NAME
48 disable_ust_lttng_event
$SESSION_NAME2 $EVENT_NAME3 $CHAN_NAME2
50 enable_ust_lttng_event_ok
$SESSION_NAME $EVENT_NAME $CHAN_NAME
51 enable_ust_lttng_event_ok
$SESSION_NAME2 $EVENT_NAME3 $CHAN_NAME2
53 start_lttng_tracing_ok
56 start_lttng_tracing_ok
59 # TODO: Validate trace output is coherent"
62 destroy_lttng_session_ok
$SESSION_NAME2
63 destroy_lttng_session_ok
$SESSION_NAME
68 # MUST set TESTDIR before calling those functions
71 print_test_banner
"$TEST_DESC"