X-Git-Url: https://git.liburcu.org/?a=blobdiff_plain;f=tests%2Fregression%2Ftools%2Fnotification%2Ftest_notification_kernel_instrumentation;h=9a8d323a1371cabe3847047d9d4791489f7cd64b;hb=3a1744008331a0604479d3d7461f77056fad3a64;hp=b8f0c7eb8df2e44a8da45c3906d06e4b7efab093;hpb=f2b390e97d3b6ec347fe7c4af3b46256716ae054;p=lttng-tools.git diff --git a/tests/regression/tools/notification/test_notification_kernel_instrumentation b/tests/regression/tools/notification/test_notification_kernel_instrumentation index b8f0c7eb8..9a8d323a1 100755 --- a/tests/regression/tools/notification/test_notification_kernel_instrumentation +++ b/tests/regression/tools/notification/test_notification_kernel_instrumentation @@ -28,22 +28,21 @@ function test_kernel_instrumentation_notification wait $APP_PID 2> /dev/null } -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_kernel_instrumentation_notification +start_lttng_sessiond_notap - stop_lttng_sessiond_notap - rmmod lttng-test +test_kernel_instrumentation_notification -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"