X-Git-Url: https://git.liburcu.org/?a=blobdiff_plain;f=tests%2Fregression%2Ftools%2Fnotification%2Ftest_notification_kernel_error;h=5f53f5b1b8399987a1591ba57484d1dda53cea5b;hb=3a1744008331a0604479d3d7461f77056fad3a64;hp=746f98112ff8a8f4684b6a0c3492efbbf9cbcfeb;hpb=7948461b0d660e7184fa1f0d5663afcaad0ff67c;p=lttng-tools.git diff --git a/tests/regression/tools/notification/test_notification_kernel_error b/tests/regression/tools/notification/test_notification_kernel_error index 746f98112..5f53f5b1b 100755 --- a/tests/regression/tools/notification/test_notification_kernel_error +++ b/tests/regression/tools/notification/test_notification_kernel_error @@ -7,10 +7,8 @@ CURDIR=$(dirname "$0")/ TESTDIR=$CURDIR/../../../ -TMPDIR=$(mktemp -d) - TESTAPP_PATH="$TESTDIR/utils/testapp" -TESTAPP_STATE_PATH=$(mktemp -u "$TMPDIR/application_state.XXXXXXXXXX") +TESTAPP_STATE_PATH=$(mktemp -u -t "tmp.test_notif_kernel_error_application_state.XXXXXXXXXX") NUM_TESTS=44 @@ -32,24 +30,22 @@ function test_basic_error_path wait $APP_PID 2> /dev/null } +check_skip_kernel_test && +{ + plan_skip_all "Skipping all tests." + exit 0 +} -if [ "$(id -u)" == "0" ]; then - validate_lttng_modules_present +validate_lttng_modules_present - modprobe lttng-test +modprobe lttng-test - start_lttng_sessiond_notap +start_lttng_sessiond_notap - test_basic_error_path +test_basic_error_path - stop_lttng_sessiond_notap - rmmod lttng-test +stop_lttng_sessiond_notap +rmmod lttng-test -else - # Kernel tests are skipped. - plan_tests $NUM_TESTS - skip 0 "Root access is needed. Skipping all kernel notification tests." $NUM_TESTS -fi -# Just in case cleanup -rm -rf "$TMPDIR" +rm -f "$TESTAPP_STATE_PATH"