tests: add check_skip_kernel_test to check root user and lttng kernel modules
[lttng-tools.git] / tests / regression / tools / regen-statedump / test_kernel
index cb0c0ad5ea8e45527346fbc56815160effd8d564..758b95d071efceea6974fa291aacd2fba6c95408 100755 (executable)
@@ -39,13 +39,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 kernel streaming tests." $NUM_TESTS ||
+check_skip_kernel_test "$NUM_TESTS" "Skipping all tests." ||
 {
        validate_lttng_modules_present
        start_lttng_sessiond
This page took 0.023113 seconds and 4 git commands to generate.