tests: add check_skip_kernel_test to check root user and lttng kernel modules
[lttng-tools.git] / tests / regression / kernel / test_kernel_function
index 131c1c70b9f8562c9c54b0a477e54f56ca36b13a..3c941c72c78424b947e215117b360b62fff71c0f 100755 (executable)
@@ -43,13 +43,7 @@ plan_tests $NUM_TESTS
 
 print_test_banner "$TEST_DESC"
 
-if [ "$(id -u)" == "0" ]; then
-       isroot=1
-else
-       isroot=0
-fi
-
-skip $isroot "Root access is needed. Skipping all tests." $NUM_TESTS ||
+check_skip_kernel_test "$NUM_TESTS" "Skipping all tests." ||
 {
        start_lttng_sessiond_notap
        validate_lttng_modules_present
This page took 0.023912 seconds and 4 git commands to generate.