Import CStringView from the Babeltrace tree
[lttng-tools.git] / tests / regression / kernel / test_rotation_destroy_flush
index 538d09b01157ee5a236723fe377c9718cb81f7ae..fc22740262afd6ffe259ee26e768a56e65e46c26 100755 (executable)
@@ -29,7 +29,7 @@ source $TESTDIR/utils/utils.sh
 function signal_cleanup()
 {
        diag "*** Exiting ***"
-       modprobe -r lttng-test
+       modprobe --remove lttng-test
        full_cleanup
 }
 
@@ -96,7 +96,7 @@ function test_rotation_destroy_flush_single()
 
        rm -rf $TRACE_PATH
 
-       modprobe -r lttng-test
+       modprobe --remove lttng-test
        stop_lttng_sessiond
 }
 
@@ -120,19 +120,14 @@ TESTS=(
 TEST_COUNT=${#TESTS[@]}
 i=0
 
-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
        trap signal_cleanup SIGTERM SIGINT
 
        while [ "$i" -lt "$TEST_COUNT" ]; do
 
-               TRACE_PATH=$(mktemp -d)
+               TRACE_PATH=$(mktemp -d -t tmp.test_kernel_rotation_destroy_flush.XXXXXX)
 
                # Execute test
                ${TESTS[$i]}
This page took 0.025161 seconds and 4 git commands to generate.