tests: add check_skip_kernel_test to check root user and lttng kernel modules
[lttng-tools.git] / tests / regression / tools / rotation / test_kernel
index 817019036f27e8f77590e1b7d7a8cfbe024c6a9d..e66a257a962da00ec612d81e143e133e7bfa9944 100755 (executable)
@@ -107,13 +107,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 kernel streaming tests." $NUM_TESTS ||
+check_skip_kernel_test "$NUM_TESTS" "Skipping all tests." ||
 {
        validate_lttng_modules_present
 
This page took 0.023494 seconds and 4 git commands to generate.