tests: add check_skip_kernel_test to check root user and lttng kernel modules
[lttng-tools.git] / tests / regression / tools / rotation / test_ust_kernel
index 2f19e807af92aa0cf1b3e35742865f79fcd8ce83..af7d452b04fbf66651e591963ea97e0623b57127 100755 (executable)
@@ -85,13 +85,7 @@ plan_tests $NUM_TESTS
 print_test_banner "$TEST_DESC"
 bail_out_if_no_babeltrace
 
-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
 
This page took 0.024212 seconds and 4 git commands to generate.