X-Git-Url: https://git.liburcu.org/?a=blobdiff_plain;f=tests%2Fregression%2Ftools%2Fnotification%2Ftest_notification_kernel_userspace_probe;h=38f5a5f41426e6f887ac963939a77f00ffc37321;hb=3a1744008331a0604479d3d7461f77056fad3a64;hp=8ef8d708d282c10260773c3a05f3a0179c8aff68;hpb=33e557114a2ba28e26e220a833e8a449c78b8b65;p=lttng-tools.git diff --git a/tests/regression/tools/notification/test_notification_kernel_userspace_probe b/tests/regression/tools/notification/test_notification_kernel_userspace_probe index 8ef8d708d..38f5a5f41 100755 --- a/tests/regression/tools/notification/test_notification_kernel_userspace_probe +++ b/tests/regression/tools/notification/test_notification_kernel_userspace_probe @@ -7,7 +7,7 @@ CURDIR=$(dirname "$0")/ TESTDIR=$CURDIR/../../../ -TESTAPP_STATE_PATH=$(mktemp --tmpdir -u "tmp.test_notif_kernel_uprobe_application_state.XXXXXXXXXX") +TESTAPP_STATE_PATH=$(mktemp -u -t "tmp.test_notif_kernel_uprobe_application_state.XXXXXXXXXX") NUM_TESTS=13 @@ -29,18 +29,18 @@ function test_kernel_userspace_probe_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 +} + +validate_lttng_modules_present - start_lttng_sessiond_notap +start_lttng_sessiond_notap - test_kernel_userspace_probe_notification +test_kernel_userspace_probe_notification - stop_lttng_sessiond_notap -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 rm -f "$TESTAPP_STATE_PATH"