X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=tests%2Fregression%2Ftools%2Fnotification%2Ftest_notification_kernel_capture;h=b65310d8801a6a50c0261db12ad330ef7f6620a4;hb=3a1744008331a0604479d3d7461f77056fad3a64;hp=88f123d3d6a662eb434cf20f463294090d12c107;hpb=33e557114a2ba28e26e220a833e8a449c78b8b65;p=lttng-tools.git diff --git a/tests/regression/tools/notification/test_notification_kernel_capture b/tests/regression/tools/notification/test_notification_kernel_capture index 88f123d3d..b65310d88 100755 --- a/tests/regression/tools/notification/test_notification_kernel_capture +++ b/tests/regression/tools/notification/test_notification_kernel_capture @@ -8,7 +8,7 @@ CURDIR=$(dirname "$0")/ TESTDIR=$CURDIR/../../../ TESTAPP_PATH="$TESTDIR/utils/testapp" -TESTAPP_STATE_PATH=$(mktemp --tmpdir -u "tmp.test_notif_kernel_capture_application_state.XXXXXXXXXX") +TESTAPP_STATE_PATH=$(mktemp -u -t "tmp.test_notif_kernel_capture_application_state.XXXXXXXXXX") NUM_TESTS=104 @@ -31,22 +31,21 @@ function test_basic_error_path } -if [ "$(id -u)" == "0" ]; then - validate_lttng_modules_present +check_skip_kernel_test && +{ + plan_skip_all "Skipping all tests." + exit 0 +} - modprobe lttng-test +validate_lttng_modules_present - start_lttng_sessiond_notap +modprobe lttng-test - test_basic_error_path +start_lttng_sessiond_notap - stop_lttng_sessiond_notap - rmmod lttng-test +test_basic_error_path -else - # Kernel tests are skipped. - plan_tests $NUM_TESTS - skip 0 "Root access is needed. Skipping all kernel notification tests." $NUM_TESTS -fi +stop_lttng_sessiond_notap +rmmod lttng-test rm -f "$TESTAPP_STATE_PATH"