tests: add check_skip_kernel_test to check root user and lttng kernel modules
[lttng-tools.git] / tests / regression / kernel / test_userspace_probe
index bfa260e47a7a00c465429f4951d6e463a4f572f8..38987f7b18aefafacc1953880c736e5fc180ca8f 100755 (executable)
@@ -815,13 +815,7 @@ fi
 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." ||
 {
        validate_lttng_modules_present
        start_lttng_sessiond
This page took 0.024233 seconds and 4 git commands to generate.