Enable perf PMU counters by raw ID
[lttng-tools.git] / tests / regression / ust / test_event_perf
index 7fb37edfeb1ff67a4dada6711384ac6c6a1a5b6d..a01418ab55167cd60c64c4b921961411120ef525 100755 (executable)
@@ -78,20 +78,22 @@ function test_event_basic()
        rm -rf $TRACE_PATH
 }
 
-uname -m|grep x86 >/dev/null
-if test $? != 0; then
-       plan_tests 1
-       ok 0 "This test only runs on x86"
-       exit 0
-fi
-
 # MUST set TESTDIR before calling those functions
 plan_tests $NUM_TESTS
 
 print_test_banner "$TEST_DESC"
 
-start_lttng_sessiond
+if [ "$(id -u)" == "0" ]; then
+        isroot=1
+else
+        isroot=0
+fi
+
+skip $isroot "Root access is needed. Skipping UST perf tests." ${NUM_TESTS} ||
+{
+       start_lttng_sessiond
 
-test_event_basic
+       test_event_basic
 
-stop_lttng_sessiond
+       stop_lttng_sessiond
+}
This page took 0.023896 seconds and 4 git commands to generate.