X-Git-Url: http://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=tests%2Fregression%2Ftools%2Fnotification%2Ftest_notification_kernel_buffer_usage;fp=tests%2Fregression%2Ftools%2Fnotification%2Ftest_notification_kernel_buffer_usage;h=a89355a448ac9e92b3eeac99726ddf4afc6faf2f;hp=5a87583dcd1198d803dac3f9a251eb3ea938bd5b;hb=3a1744008331a0604479d3d7461f77056fad3a64;hpb=f2b390e97d3b6ec347fe7c4af3b46256716ae054 diff --git a/tests/regression/tools/notification/test_notification_kernel_buffer_usage b/tests/regression/tools/notification/test_notification_kernel_buffer_usage index 5a87583dc..a89355a44 100755 --- a/tests/regression/tools/notification/test_notification_kernel_buffer_usage +++ b/tests/regression/tools/notification/test_notification_kernel_buffer_usage @@ -63,29 +63,27 @@ function test_buffer_usage_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." + rm -rf "$TEST_TMPDIR" + exit 0 +} - modprobe lttng-test +validate_lttng_modules_present - # Used on sessiond launch. - LTTNG_SESSIOND_ENV_VARS="LTTNG_TESTPOINT_ENABLE=1 \ - CONSUMER_PAUSE_PIPE_PATH=${TESTPOINT_PIPE_PATH} \ - LD_PRELOAD=${TESTPOINT}" - start_lttng_sessiond_notap +modprobe lttng-test - test_buffer_usage_notification +# Used on sessiond launch. +LTTNG_SESSIOND_ENV_VARS="LTTNG_TESTPOINT_ENABLE=1 \ + CONSUMER_PAUSE_PIPE_PATH=${TESTPOINT_PIPE_PATH} \ + LD_PRELOAD=${TESTPOINT}" +start_lttng_sessiond_notap - stop_lttng_sessiond_notap - rmmod lttng-test +test_buffer_usage_notification - rm -rf "${consumerd_pipe[@]}" 2> /dev/null -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 -rf "${consumerd_pipe[@]}" 2> /dev/null rm -rf "$TEST_TMPDIR"