linux-kselftest.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] selftests:intel_pstate: fixes typical crash of a testing script for Intel P-State driver
       [not found] <20180429191226.14242-1-ahiliation@yahoo.co.in>
@ 2018-05-04 19:47 ` shuah
  2018-05-04 19:47   ` Shuah Khan
  2018-05-08 20:21   ` shuah
  0 siblings, 2 replies; 6+ messages in thread
From: shuah @ 2018-05-04 19:47 UTC (permalink / raw)


On 04/29/2018 01:12 PM, Jeffrin Jose T wrote:
>  Testing script for Intel P-State driver crashes during
>  the run.  this patch fixes that crash and produce typical results.
> 
> Signed-off-by: Jeffrin Jose T <jeffrin at rajagiritech.edu.in>
> 
> ---
>  tools/testing/selftests/intel_pstate/run.sh | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/tools/testing/selftests/intel_pstate/run.sh b/tools/testing/selftests/intel_pstate/run.sh
> index c670359becc6..cd32aca8806f 100755
> --- a/tools/testing/selftests/intel_pstate/run.sh
> +++ b/tools/testing/selftests/intel_pstate/run.sh
> @@ -27,6 +27,7 @@
>  # and the test will error out in those cases.  The result.X file can be checked
>  # for consistency and modified to remove the extra MHz values.  The result.X
>  # files can be re-evaluated by setting EVALUATE_ONLY to 1 below.
> +#set -xv
>  
>  EVALUATE_ONLY=0
>  
> @@ -101,12 +102,13 @@ cpupower frequency-set -g powersave --max=${max_freq}MHz >& /dev/null
>  echo "Target      Actual      Difference     MSR(0x199)     max_perf_pct"
>  for freq in `seq $max_freq -100 $min_freq`
>  do
> -	result_freq=$(cat /tmp/result.${freq} | grep "cpu MHz" | awk ' { print $4 } ' | awk -F "." ' { print $1 } ')
> +       result_freq=$(cat /tmp/result.${freq} | grep "cpu MHz" \
>         | awk '{print $4}' | awk -F "." '{print $1}')
> +	result_freq=$(echo $result_freq | head -n1 | cut -d " " -f1)
>  	msr=$(cat /tmp/result.${freq} | grep "msr" | awk ' { print $3 } ')
>  	max_perf_pct=$(cat /tmp/result.${freq} | grep "max_perf_pct" | awk ' { print $2 } ' )
> -	if [ $result_freq -eq $freq ]; then
> +	if (( "$result_freq" == "$freq" ))
> +	then
>  		echo " $freq        $result_freq             0          $msr         $(($max_perf_pct*3300))"
>  	else
>  		echo " $freq        $result_freq          $(($result_freq-$freq))          $msr          $(($max_perf_pct*$max_freq))"
> 

Thanks. I will get this into 4.17-rc5

-- Shuah
--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH] selftests:intel_pstate: fixes typical crash of a testing script for Intel P-State driver
  2018-05-04 19:47 ` [PATCH] selftests:intel_pstate: fixes typical crash of a testing script for Intel P-State driver shuah
@ 2018-05-04 19:47   ` Shuah Khan
  2018-05-08 20:21   ` shuah
  1 sibling, 0 replies; 6+ messages in thread
From: Shuah Khan @ 2018-05-04 19:47 UTC (permalink / raw)


On 04/29/2018 01:12 PM, Jeffrin Jose T wrote:
>  Testing script for Intel P-State driver crashes during
>  the run.  this patch fixes that crash and produce typical results.
> 
> Signed-off-by: Jeffrin Jose T <jeffrin at rajagiritech.edu.in>
> 
> ---
>  tools/testing/selftests/intel_pstate/run.sh | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/tools/testing/selftests/intel_pstate/run.sh b/tools/testing/selftests/intel_pstate/run.sh
> index c670359becc6..cd32aca8806f 100755
> --- a/tools/testing/selftests/intel_pstate/run.sh
> +++ b/tools/testing/selftests/intel_pstate/run.sh
> @@ -27,6 +27,7 @@
>  # and the test will error out in those cases.  The result.X file can be checked
>  # for consistency and modified to remove the extra MHz values.  The result.X
>  # files can be re-evaluated by setting EVALUATE_ONLY to 1 below.
> +#set -xv
>  
>  EVALUATE_ONLY=0
>  
> @@ -101,12 +102,13 @@ cpupower frequency-set -g powersave --max=${max_freq}MHz >& /dev/null
>  echo "Target      Actual      Difference     MSR(0x199)     max_perf_pct"
>  for freq in `seq $max_freq -100 $min_freq`
>  do
> -	result_freq=$(cat /tmp/result.${freq} | grep "cpu MHz" | awk ' { print $4 } ' | awk -F "." ' { print $1 } ')
> +       result_freq=$(cat /tmp/result.${freq} | grep "cpu MHz" \
>         | awk '{print $4}' | awk -F "." '{print $1}')
> +	result_freq=$(echo $result_freq | head -n1 | cut -d " " -f1)
>  	msr=$(cat /tmp/result.${freq} | grep "msr" | awk ' { print $3 } ')
>  	max_perf_pct=$(cat /tmp/result.${freq} | grep "max_perf_pct" | awk ' { print $2 } ' )
> -	if [ $result_freq -eq $freq ]; then
> +	if (( "$result_freq" == "$freq" ))
> +	then
>  		echo " $freq        $result_freq             0          $msr         $(($max_perf_pct*3300))"
>  	else
>  		echo " $freq        $result_freq          $(($result_freq-$freq))          $msr          $(($max_perf_pct*$max_freq))"
> 

Thanks. I will get this into 4.17-rc5

-- Shuah
--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH] selftests:intel_pstate: fixes typical crash of a testing script for Intel P-State driver
  2018-05-04 19:47 ` [PATCH] selftests:intel_pstate: fixes typical crash of a testing script for Intel P-State driver shuah
  2018-05-04 19:47   ` Shuah Khan
@ 2018-05-08 20:21   ` shuah
  2018-05-08 20:21     ` Shuah Khan
  2018-05-09 14:27     ` jeffrin
  1 sibling, 2 replies; 6+ messages in thread
From: shuah @ 2018-05-08 20:21 UTC (permalink / raw)


On 05/04/2018 01:47 PM, Shuah Khan wrote:
> On 04/29/2018 01:12 PM, Jeffrin Jose T wrote:
>>  Testing script for Intel P-State driver crashes during
>>  the run.  this patch fixes that crash and produce typical results.
>>
>> Signed-off-by: Jeffrin Jose T <jeffrin at rajagiritech.edu.in>
>>
>> ---
>>  tools/testing/selftests/intel_pstate/run.sh | 7 +++++--
>>  1 file changed, 5 insertions(+), 2 deletions(-)
>>
>> diff --git a/tools/testing/selftests/intel_pstate/run.sh b/tools/testing/selftests/intel_pstate/run.sh
>> index c670359becc6..cd32aca8806f 100755
>> --- a/tools/testing/selftests/intel_pstate/run.sh
>> +++ b/tools/testing/selftests/intel_pstate/run.sh
>> @@ -27,6 +27,7 @@
>>  # and the test will error out in those cases.  The result.X file can be checked
>>  # for consistency and modified to remove the extra MHz values.  The result.X
>>  # files can be re-evaluated by setting EVALUATE_ONLY to 1 below.
>> +#set -xv
>>  
>>  EVALUATE_ONLY=0
>>  
>> @@ -101,12 +102,13 @@ cpupower frequency-set -g powersave --max=${max_freq}MHz >& /dev/null
>>  echo "Target      Actual      Difference     MSR(0x199)     max_perf_pct"
>>  for freq in `seq $max_freq -100 $min_freq`
>>  do
>> -	result_freq=$(cat /tmp/result.${freq} | grep "cpu MHz" | awk ' { print $4 } ' | awk -F "." ' { print $1 } ')
>> +       result_freq=$(cat /tmp/result.${freq} | grep "cpu MHz" \
>>         | awk '{print $4}' | awk -F "." '{print $1}')
>> +	result_freq=$(echo $result_freq | head -n1 | cut -d " " -f1)
>>  	msr=$(cat /tmp/result.${freq} | grep "msr" | awk ' { print $3 } ')
>>  	max_perf_pct=$(cat /tmp/result.${freq} | grep "max_perf_pct" | awk ' { print $2 } ' )
>> -	if [ $result_freq -eq $freq ]; then
>> +	if (( "$result_freq" == "$freq" ))
>> +	then
>>  		echo " $freq        $result_freq             0          $msr         $(($max_perf_pct*3300))"
>>  	else
>>  		echo " $freq        $result_freq          $(($result_freq-$freq))          $msr          $(($max_perf_pct*$max_freq))"
>>
> 
> Thanks. I will get this into 4.17-rc5
> 
> -- Shuah
> 

This patch didn't apply. In any case Daniel Diaz sent in a patch a coupld of weeks ago
which did apply and fixes the same problem.

I applied Daniel's patch to linux-kselftest fixes for 4.17-rc5

https://lists.linaro.org/pipermail/linux-kselftest-mirror/2018-April/000858.html

thank you both.

-- Shuah
--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH] selftests:intel_pstate: fixes typical crash of a testing script for Intel P-State driver
  2018-05-08 20:21   ` shuah
@ 2018-05-08 20:21     ` Shuah Khan
  2018-05-09 14:27     ` jeffrin
  1 sibling, 0 replies; 6+ messages in thread
From: Shuah Khan @ 2018-05-08 20:21 UTC (permalink / raw)


On 05/04/2018 01:47 PM, Shuah Khan wrote:
> On 04/29/2018 01:12 PM, Jeffrin Jose T wrote:
>>  Testing script for Intel P-State driver crashes during
>>  the run.  this patch fixes that crash and produce typical results.
>>
>> Signed-off-by: Jeffrin Jose T <jeffrin at rajagiritech.edu.in>
>>
>> ---
>>  tools/testing/selftests/intel_pstate/run.sh | 7 +++++--
>>  1 file changed, 5 insertions(+), 2 deletions(-)
>>
>> diff --git a/tools/testing/selftests/intel_pstate/run.sh b/tools/testing/selftests/intel_pstate/run.sh
>> index c670359becc6..cd32aca8806f 100755
>> --- a/tools/testing/selftests/intel_pstate/run.sh
>> +++ b/tools/testing/selftests/intel_pstate/run.sh
>> @@ -27,6 +27,7 @@
>>  # and the test will error out in those cases.  The result.X file can be checked
>>  # for consistency and modified to remove the extra MHz values.  The result.X
>>  # files can be re-evaluated by setting EVALUATE_ONLY to 1 below.
>> +#set -xv
>>  
>>  EVALUATE_ONLY=0
>>  
>> @@ -101,12 +102,13 @@ cpupower frequency-set -g powersave --max=${max_freq}MHz >& /dev/null
>>  echo "Target      Actual      Difference     MSR(0x199)     max_perf_pct"
>>  for freq in `seq $max_freq -100 $min_freq`
>>  do
>> -	result_freq=$(cat /tmp/result.${freq} | grep "cpu MHz" | awk ' { print $4 } ' | awk -F "." ' { print $1 } ')
>> +       result_freq=$(cat /tmp/result.${freq} | grep "cpu MHz" \
>>         | awk '{print $4}' | awk -F "." '{print $1}')
>> +	result_freq=$(echo $result_freq | head -n1 | cut -d " " -f1)
>>  	msr=$(cat /tmp/result.${freq} | grep "msr" | awk ' { print $3 } ')
>>  	max_perf_pct=$(cat /tmp/result.${freq} | grep "max_perf_pct" | awk ' { print $2 } ' )
>> -	if [ $result_freq -eq $freq ]; then
>> +	if (( "$result_freq" == "$freq" ))
>> +	then
>>  		echo " $freq        $result_freq             0          $msr         $(($max_perf_pct*3300))"
>>  	else
>>  		echo " $freq        $result_freq          $(($result_freq-$freq))          $msr          $(($max_perf_pct*$max_freq))"
>>
> 
> Thanks. I will get this into 4.17-rc5
> 
> -- Shuah
> 

This patch didn't apply. In any case Daniel Diaz sent in a patch a coupld of weeks ago
which did apply and fixes the same problem.

I applied Daniel's patch to linux-kselftest fixes for 4.17-rc5

https://lists.linaro.org/pipermail/linux-kselftest-mirror/2018-April/000858.html

thank you both.

-- Shuah
--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH] selftests:intel_pstate: fixes typical crash of a testing script for Intel P-State driver
  2018-05-08 20:21   ` shuah
  2018-05-08 20:21     ` Shuah Khan
@ 2018-05-09 14:27     ` jeffrin
  2018-05-09 14:27       ` Jeffrin Thalakkottoor
  1 sibling, 1 reply; 6+ messages in thread
From: jeffrin @ 2018-05-09 14:27 UTC (permalink / raw)


hello  Shuah,

i had  later send another version of that patch.
anyway thank you  daniel for your effort

thank you both.



On Wed, May 9, 2018 at 1:51 AM, Shuah Khan <shuah at kernel.org> wrote:
> On 05/04/2018 01:47 PM, Shuah Khan wrote:
>> On 04/29/2018 01:12 PM, Jeffrin Jose T wrote:
>>>  Testing script for Intel P-State driver crashes during
>>>  the run.  this patch fixes that crash and produce typical results.
>>>
>>> Signed-off-by: Jeffrin Jose T <jeffrin at rajagiritech.edu.in>
>>>
>>> ---
>>>  tools/testing/selftests/intel_pstate/run.sh | 7 +++++--
>>>  1 file changed, 5 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/tools/testing/selftests/intel_pstate/run.sh b/tools/testing/selftests/intel_pstate/run.sh
>>> index c670359becc6..cd32aca8806f 100755
>>> --- a/tools/testing/selftests/intel_pstate/run.sh
>>> +++ b/tools/testing/selftests/intel_pstate/run.sh
>>> @@ -27,6 +27,7 @@
>>>  # and the test will error out in those cases.  The result.X file can be checked
>>>  # for consistency and modified to remove the extra MHz values.  The result.X
>>>  # files can be re-evaluated by setting EVALUATE_ONLY to 1 below.
>>> +#set -xv
>>>
>>>  EVALUATE_ONLY=0
>>>
>>> @@ -101,12 +102,13 @@ cpupower frequency-set -g powersave --max=${max_freq}MHz >& /dev/null
>>>  echo "Target      Actual      Difference     MSR(0x199)     max_perf_pct"
>>>  for freq in `seq $max_freq -100 $min_freq`
>>>  do
>>> -    result_freq=$(cat /tmp/result.${freq} | grep "cpu MHz" | awk ' { print $4 } ' | awk -F "." ' { print $1 } ')
>>> +       result_freq=$(cat /tmp/result.${freq} | grep "cpu MHz" \
>>>         | awk '{print $4}' | awk -F "." '{print $1}')
>>> +    result_freq=$(echo $result_freq | head -n1 | cut -d " " -f1)
>>>      msr=$(cat /tmp/result.${freq} | grep "msr" | awk ' { print $3 } ')
>>>      max_perf_pct=$(cat /tmp/result.${freq} | grep "max_perf_pct" | awk ' { print $2 } ' )
>>> -    if [ $result_freq -eq $freq ]; then
>>> +    if (( "$result_freq" == "$freq" ))
>>> +    then
>>>              echo " $freq        $result_freq             0          $msr         $(($max_perf_pct*3300))"
>>>      else
>>>              echo " $freq        $result_freq          $(($result_freq-$freq))          $msr          $(($max_perf_pct*$max_freq))"
>>>
>>
>> Thanks. I will get this into 4.17-rc5
>>
>> -- Shuah
>>
>
> This patch didn't apply. In any case Daniel Diaz sent in a patch a coupld of weeks ago
> which did apply and fixes the same problem.
>
> I applied Daniel's patch to linux-kselftest fixes for 4.17-rc5
>
> https://lists.linaro.org/pipermail/linux-kselftest-mirror/2018-April/000858.html
>
> thank you both.
>
> -- Shuah



-- 
software engineer
rajagiri school of engineering and technology
--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH] selftests:intel_pstate: fixes typical crash of a testing script for Intel P-State driver
  2018-05-09 14:27     ` jeffrin
@ 2018-05-09 14:27       ` Jeffrin Thalakkottoor
  0 siblings, 0 replies; 6+ messages in thread
From: Jeffrin Thalakkottoor @ 2018-05-09 14:27 UTC (permalink / raw)


hello  Shuah,

i had  later send another version of that patch.
anyway thank you  daniel for your effort

thank you both.



On Wed, May 9, 2018@1:51 AM, Shuah Khan <shuah@kernel.org> wrote:
> On 05/04/2018 01:47 PM, Shuah Khan wrote:
>> On 04/29/2018 01:12 PM, Jeffrin Jose T wrote:
>>>  Testing script for Intel P-State driver crashes during
>>>  the run.  this patch fixes that crash and produce typical results.
>>>
>>> Signed-off-by: Jeffrin Jose T <jeffrin at rajagiritech.edu.in>
>>>
>>> ---
>>>  tools/testing/selftests/intel_pstate/run.sh | 7 +++++--
>>>  1 file changed, 5 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/tools/testing/selftests/intel_pstate/run.sh b/tools/testing/selftests/intel_pstate/run.sh
>>> index c670359becc6..cd32aca8806f 100755
>>> --- a/tools/testing/selftests/intel_pstate/run.sh
>>> +++ b/tools/testing/selftests/intel_pstate/run.sh
>>> @@ -27,6 +27,7 @@
>>>  # and the test will error out in those cases.  The result.X file can be checked
>>>  # for consistency and modified to remove the extra MHz values.  The result.X
>>>  # files can be re-evaluated by setting EVALUATE_ONLY to 1 below.
>>> +#set -xv
>>>
>>>  EVALUATE_ONLY=0
>>>
>>> @@ -101,12 +102,13 @@ cpupower frequency-set -g powersave --max=${max_freq}MHz >& /dev/null
>>>  echo "Target      Actual      Difference     MSR(0x199)     max_perf_pct"
>>>  for freq in `seq $max_freq -100 $min_freq`
>>>  do
>>> -    result_freq=$(cat /tmp/result.${freq} | grep "cpu MHz" | awk ' { print $4 } ' | awk -F "." ' { print $1 } ')
>>> +       result_freq=$(cat /tmp/result.${freq} | grep "cpu MHz" \
>>>         | awk '{print $4}' | awk -F "." '{print $1}')
>>> +    result_freq=$(echo $result_freq | head -n1 | cut -d " " -f1)
>>>      msr=$(cat /tmp/result.${freq} | grep "msr" | awk ' { print $3 } ')
>>>      max_perf_pct=$(cat /tmp/result.${freq} | grep "max_perf_pct" | awk ' { print $2 } ' )
>>> -    if [ $result_freq -eq $freq ]; then
>>> +    if (( "$result_freq" == "$freq" ))
>>> +    then
>>>              echo " $freq        $result_freq             0          $msr         $(($max_perf_pct*3300))"
>>>      else
>>>              echo " $freq        $result_freq          $(($result_freq-$freq))          $msr          $(($max_perf_pct*$max_freq))"
>>>
>>
>> Thanks. I will get this into 4.17-rc5
>>
>> -- Shuah
>>
>
> This patch didn't apply. In any case Daniel Diaz sent in a patch a coupld of weeks ago
> which did apply and fixes the same problem.
>
> I applied Daniel's patch to linux-kselftest fixes for 4.17-rc5
>
> https://lists.linaro.org/pipermail/linux-kselftest-mirror/2018-April/000858.html
>
> thank you both.
>
> -- Shuah



-- 
software engineer
rajagiri school of engineering and technology
--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

end of thread, other threads:[~2018-05-09 14:27 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20180429191226.14242-1-ahiliation@yahoo.co.in>
2018-05-04 19:47 ` [PATCH] selftests:intel_pstate: fixes typical crash of a testing script for Intel P-State driver shuah
2018-05-04 19:47   ` Shuah Khan
2018-05-08 20:21   ` shuah
2018-05-08 20:21     ` Shuah Khan
2018-05-09 14:27     ` jeffrin
2018-05-09 14:27       ` 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).