b69a4d80ce562189337340a7ac47459a661e158d
[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 TMPDIR=$(mktemp -d)
11
12 TESTAPP_PATH="$TESTDIR/utils/testapp"
13 TESTAPP_STATE_PATH=$(mktemp -u "$TMPDIR/application_state.XXXXXXXXXX")
14
15 NUM_TESTS=44
16
17 # shellcheck source=../../../utils/utils.sh
18 source "$TESTDIR/utils/utils.sh"
19
20 function test_basic_error_path
21 {
22 $CURDIR/notification 1 LTTNG_DOMAIN_KERNEL
23 }
24
25
26 if [ "$(id -u)" == "0" ]; then
27 validate_lttng_modules_present
28
29 modprobe lttng-test
30
31 start_lttng_sessiond_notap
32
33 test_basic_error_path
34
35 stop_lttng_sessiond_notap
36 rmmod lttng-test
37
38 else
39 # Kernel tests are skipped.
40 plan_tests $NUM_TESTS
41 skip 0 "Root access is needed. Skipping all kernel notification tests." $NUM_TESTS
42 fi
43
44 # Just in case cleanup
45 rm -rf "$TMPDIR"
This page took 0.031803 seconds and 4 git commands to generate.