linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RESEND PATCH] selftests: intel_pstate: notification about privilege required to run intel_pstate testing script
@ 2018-05-30 22:03 Jeffrin Jose T
  2018-05-30 23:42 ` Shuah Khan
  0 siblings, 1 reply; 3+ messages in thread
From: Jeffrin Jose T @ 2018-05-30 22:03 UTC (permalink / raw)
  To: shuah, daniel.diaz, kstewart, tglx, thomas, gregkh
  Cc: linux-kselftest, linux-kernel, Jeffrin Jose T

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>
---
 tools/testing/selftests/intel_pstate/run.sh | 6 ++++++
 1 file changed, 6 insertions(+)

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
 	exit $ksft_skip
 fi
 
+msg="skip all tests:"
+if [ $UID != 0 ] && [ $EVALUATE_ONLY == 0 ]; then
+    echo $msg please run this as root >&2
+    exit $ksft_skip
+fi
+
 max_cpus=$(($(nproc)-1))
 
 function run_test () {
-- 
2.17.0

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [RESEND PATCH] selftests: intel_pstate: notification about privilege required to run intel_pstate testing script
  2018-05-30 22:03 [RESEND PATCH] selftests: intel_pstate: notification about privilege required to run intel_pstate testing script Jeffrin Jose T
@ 2018-05-30 23:42 ` Shuah Khan
  2018-05-31 13:04   ` Jeffrin Thalakkottoor
  0 siblings, 1 reply; 3+ messages in thread
From: Shuah Khan @ 2018-05-30 23:42 UTC (permalink / raw)
  To: Jeffrin Jose T, daniel.diaz, kstewart, tglx, thomas, gregkh
  Cc: linux-kselftest, linux-kernel, Shuah Khan

On 05/30/2018 04:03 PM, Jeffrin Jose T wrote:
> 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>
> ---

I will take this patch and apply it to linux-kselftest next for 4.18-rc1.

For next time, this patch should have been tagged v2 not RESEND. Also please
include changes made since the last version in this spot after the Signed-off-by
line.

>  tools/testing/selftests/intel_pstate/run.sh | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> 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
>  	exit $ksft_skip
>  fi
>  
> +msg="skip all tests:"
> +if [ $UID != 0 ] && [ $EVALUATE_ONLY == 0 ]; then
> +    echo $msg please run this as root >&2
> +    exit $ksft_skip
> +fi
> +
>  max_cpus=$(($(nproc)-1))
>  
>  function run_test () {
> 

thanks,
-- Shuah

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [RESEND PATCH] selftests: intel_pstate: notification about privilege required to run intel_pstate testing script
  2018-05-30 23:42 ` Shuah Khan
@ 2018-05-31 13:04   ` Jeffrin Thalakkottoor
  0 siblings, 0 replies; 3+ messages in thread
From: Jeffrin Thalakkottoor @ 2018-05-31 13:04 UTC (permalink / raw)
  To: Shuah Khan
  Cc: daniel.diaz, Kate Stewart, tglx, thomas, gregkh, linux-kselftest,
	linux-kernel

On Thu, May 31, 2018 at 5:12 AM, Shuah Khan <shuah@kernel.org> wrote:
> I will take this patch and apply it to linux-kselftest next for 4.18-rc1.
anyway thanks .

> For next time, this patch should have been tagged v2 not RESEND. Also please
> include changes made since the last version in this spot after the Signed-off-by
> line.
thanks for correction

--
software engineer
rajagiri school of engineering and technology

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-05-31 13:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-30 22:03 [RESEND PATCH] selftests: intel_pstate: notification about privilege required to run intel_pstate testing script Jeffrin Jose T
2018-05-30 23:42 ` Shuah Khan
2018-05-31 13:04   ` Jeffrin Thalakkottoor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).