X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=tests%2Fregression%2Ftools%2Fnotification%2Ftest_notification_kernel_syscall;h=c9a40d077a5967844cf4d9374f13c2b502da578b;hb=3a1744008331a0604479d3d7461f77056fad3a64;hp=62c1e74d77995d5b2c2a5ade15dfe552aa155ac3;hpb=aab0598f56aca0553f9beac7cac2baa340aa6702;p=lttng-tools.git diff --git a/tests/regression/tools/notification/test_notification_kernel_syscall b/tests/regression/tools/notification/test_notification_kernel_syscall index 62c1e74d7..c9a40d077 100755 --- a/tests/regression/tools/notification/test_notification_kernel_syscall +++ b/tests/regression/tools/notification/test_notification_kernel_syscall @@ -7,9 +7,7 @@ CURDIR=$(dirname "$0")/ TESTDIR=$CURDIR/../../../ -TMPDIR=$(mktemp -d) - -TESTAPP_STATE_PATH=$(mktemp -u "$TMPDIR/application_state.XXXXXXXXXX") +TESTAPP_STATE_PATH=$(mktemp -u -t "tmp.test_notif_kernel_syscall_application_state.XXXXXX") NUM_TESTS=25 @@ -33,20 +31,18 @@ function test_kernel_syscall_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 +} - start_lttng_sessiond_notap +validate_lttng_modules_present - test_kernel_syscall_notification +start_lttng_sessiond_notap - stop_lttng_sessiond_notap +test_kernel_syscall_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 -# Just in case cleanup -rm -rf "$TMPDIR" +rm -f "$TESTAPP_STATE_PATH"