3 # Copyright (C) 2017 Jonathan Rajotte-Julien <jonathan.rajotte-julien@efficios.com>
5 # SPDX-License-Identifier: LGPL-2.1-only
8 TESTDIR
=$CURDIR/..
/..
/..
/
12 #This is needed since the testpoint create a pipe with the consumerd type suffixed
13 TESTPOINT_BASE_PATH
=$
(readlink
-f "$TMPDIR/lttng.t_p_n")
14 TESTPOINT_PIPE_PATH
=$
(mktemp
-u "${TESTPOINT_BASE_PATH}.XXXXXX")
15 TESTPOINT
=$
(readlink
-f ${CURDIR}/.libs
/libpause_consumer.so
)
18 TESTAPP_PATH
="$TESTDIR/utils/testapp"
20 GEN_UST_EVENTS_TESTAPP_NAME
="gen-ust-events"
21 GEN_UST_EVENTS_TESTAPP_BIN
="$TESTAPP_PATH/$GEN_UST_EVENTS_TESTAPP_NAME/$GEN_UST_EVENTS_TESTAPP_NAME"
23 GEN_UST_NEVENTS_TESTAPP_NAME
="gen-ust-nevents"
24 GEN_UST_NEVENTS_TESTAPP_BIN
="$TESTAPP_PATH/$GEN_UST_NEVENTS_TESTAPP_NAME/$GEN_UST_NEVENTS_TESTAPP_NAME"
26 TESTAPP_STATE_PATH
=$
(mktemp
-u "$TMPDIR/application_state.XXXXXXXXXX")
31 SESSION_NAME
="my_session"
32 CHANNEL_NAME
="my_channel"
34 TRACE_PATH
=$
(mktemp
-d)
35 PAGE_SIZE
=$
(getconf PAGE_SIZE
)
37 DIR
=$
(readlink
-f $TESTDIR)
40 source $TESTDIR/utils
/utils.sh
42 function ust_event_generator_toggle_state
44 ust_event_generator_suspended
=$
((ust_event_generator_suspended
==0))
47 function ust_event_generator
51 ust_event_generator_suspended
=0
52 trap ust_event_generator_toggle_state SIGUSR1
55 if [[ $ust_event_generator_suspended -eq "1" ]]; then
59 if [[ -f $state_file ]]; then
60 rm -rf $state_file 2> /dev
/null
62 taskset
-c 0 $test_app -i $NR_ITER -w $NR_USEC_WAIT > /dev
/null
2>&1
67 function test_event_rule_condition_exclusion_notification
69 ust_event_generator
$GEN_UST_NEVENTS_TESTAPP_BIN $TESTAPP_STATE_PATH &
72 $CURDIR/.libs
/notification
3 LTTNG_DOMAIN_UST
$APP_PID $TESTAPP_STATE_PATH
75 wait $APP_PID 2> /dev
/null
78 LTTNG_SESSIOND_ENV_VARS
="LTTNG_TESTPOINT_ENABLE=1 CONSUMER_PAUSE_PIPE_PATH=${TESTPOINT_PIPE_PATH} LD_PRELOAD=${TESTPOINT}"
79 start_lttng_sessiond_notap
81 test_event_rule_condition_exclusion_notification
83 stop_lttng_sessiond_notap