aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorJeffrin Jose T <ahiliation@gmail.com>2018-05-30 18:03:39 -0400
committerShuah Khan (Samsung OSG) <shuah@kernel.org>2018-05-30 23:31:31 -0400
commit9070ee31ab106464e0d89019a9c4df787179bf3e (patch)
tree10fc9888f867c26481b8858ae5691060fe146004 /tools
parent5f8f019380b86f4e84445c2f2f8533de9c91fbe6 (diff)
selftests: intel_pstate: notification about privilege required to run intel_pstate testing script
The intel_pstate related testing script need root level privileges when trying to access certain file for the successful execution of the script.But this is not the case always like when using evaluation only mode, which only require user level privilege. This patch is to notify the user about the privilege the script demands for the successful execution of the test. Signed-off-by: Jeffrin Jose T (Rajagiri SET) <ahiliation@gmail.com> Signed-off-by: Shuah Khan (Samsung OSG) <shuah@kernel.org>
Diffstat (limited to 'tools')
-rwxr-xr-xtools/testing/selftests/intel_pstate/run.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/testing/selftests/intel_pstate/run.sh b/tools/testing/selftests/intel_pstate/run.sh
index 8576f6564307..e7008f614ad7 100755
--- a/tools/testing/selftests/intel_pstate/run.sh
+++ b/tools/testing/selftests/intel_pstate/run.sh
@@ -38,6 +38,12 @@ if ! uname -m | sed -e s/i.86/x86/ -e s/x86_64/x86/ | grep -q x86; then
38 exit $ksft_skip 38 exit $ksft_skip
39fi 39fi
40 40
41msg="skip all tests:"
42if [ $UID != 0 ] && [ $EVALUATE_ONLY == 0 ]; then
43 echo $msg please run this as root >&2
44 exit $ksft_skip
45fi
46
41max_cpus=$(($(nproc)-1)) 47max_cpus=$(($(nproc)-1))
42 48
43function run_test () { 49function run_test () {