fix: relayd: unaligned access in trace_chunk_registry_ht_key_hash
[lttng-tools.git] / tests / regression / tools / notification / test_notification_kernel_error
1 #!/bin/bash
2 #
3 # Copyright (C) 2017 Jonathan Rajotte-Julien <jonathan.rajotte-julien@efficios.com>
4 #
5 # SPDX-License-Identifier: LGPL-2.1-only
6
7 CURDIR=$(dirname "$0")/
8 TESTDIR=$CURDIR/../../../
9
10 TESTAPP_PATH="$TESTDIR/utils/testapp"
11 TESTAPP_STATE_PATH=$(mktemp -u -t "tmp.test_notif_kernel_error_application_state.XXXXXXXXXX")
12
13 NUM_TESTS=44
14
15 # shellcheck source=../../../utils/utils.sh
16 source "$TESTDIR/utils/utils.sh"
17 # shellcheck source=./util_event_generator.sh
18 source "$CURDIR/util_event_generator.sh"
19
20 function test_basic_error_path
21 {
22 kernel_event_generator_run_once_per_transition generate_filter_events \
23 "$TESTAPP_STATE_PATH" 10 &
24 APP_PID=$!
25
26 "$CURDIR/notification" 1 LTTNG_DOMAIN_KERNEL $APP_PID \
27 "$TESTAPP_STATE_PATH"
28
29 kill -SIGUSR2 $APP_PID
30 wait $APP_PID 2> /dev/null
31 }
32
33 check_skip_kernel_test &&
34 {
35 plan_skip_all "Skipping all tests."
36 exit 0
37 }
38
39 validate_lttng_modules_present
40
41 modprobe lttng-test
42
43 start_lttng_sessiond_notap
44
45 test_basic_error_path
46
47 stop_lttng_sessiond_notap
48 rmmod lttng-test
49
50
51 rm -f "$TESTAPP_STATE_PATH"
This page took 0.030415 seconds and 4 git commands to generate.