tests: add check_skip_kernel_test to check root user and lttng kernel modules
[lttng-tools.git] / tests / destructive / metadata-regeneration
index 048c601b60f06f4f9d0aff58d375c2243e4ddc21..dcae6bce0dfb901f318bd26bdc8012f0e7d51cc3 100755 (executable)
@@ -189,12 +189,6 @@ function test_ust_streaming ()
        rm -f "${file_sync_before_last}"
 }
 
-if [ "$(id -u)" == "0" ]; then
-       isroot=1
-else
-       isroot=0
-fi
-
 if ! destructive_tests_enabled ; then
        echo 'Please make sure that ntp is not running while executing this test'
        skip 0 "You need to set the LTTNG_ENABLE_DESTRUCTIVE_TESTS environment variable to \"will-break-my-system\" to run this test" $NUM_TESTS
@@ -202,7 +196,7 @@ if ! destructive_tests_enabled ; then
        exit 0
 fi
 
-skip $isroot "Root access is needed. Skipping all tests." $NUM_TESTS ||
+check_skip_kernel_test $NUM_TESTS "Skipping all tests." ||
 {
        original_date=$(date)
        start_lttng_relayd "-o $TRACE_PATH"
This page took 0.025299 seconds and 4 git commands to generate.