3 # Copyright (C) 2017 Jonathan Rajotte-Julien <jonathan.rajotte-julien@efficios.com>
5 # SPDX-License-Identifier: LGPL-2.1-only
7 CURDIR
=$
(dirname "$0")/
8 TESTDIR
=$CURDIR/..
/..
/..
/
10 TESTAPP_STATE_PATH
=$
(mktemp
-u -t "tmp.test_notif_kernel_uprobe_application_state.XXXXXXXXXX")
14 # shellcheck source=../../../utils/utils.sh
15 source "$TESTDIR/utils/utils.sh"
16 # shellcheck source=./util_event_generator.sh
17 source "$CURDIR/util_event_generator.sh"
19 function test_kernel_userspace_probe_notification
21 kernel_event_generator_run_once_per_transition userspace_probe_testapp
"$TESTAPP_STATE_PATH" 10 &
24 "$CURDIR/notification" 6 LTTNG_DOMAIN_KERNEL \
25 $APP_PID "$TESTAPP_STATE_PATH" \
26 "$USERSPACE_PROBE_ELF_TESTAPP_BIN" "test_function"
28 kill -SIGUSR2 $APP_PID
29 wait $APP_PID 2> /dev
/null
32 check_skip_kernel_test
&&
34 plan_skip_all
"Skipping all tests."
38 validate_lttng_modules_present
40 start_lttng_sessiond_notap
42 test_kernel_userspace_probe_notification
44 stop_lttng_sessiond_notap
46 rm -f "$TESTAPP_STATE_PATH"