Hi :

I have no idea that when it was changed. But I think we could update the 
matching program to compatibility old and new.

B.R.
Guoqi
-----Original Message-----
From: [email protected] [mailto:[email protected]] 
Sent: Thursday, October 17, 2013 8:53 PM
To: Liao Guoqi-B25230
Cc: [email protected]
Subject: Re: [LTP] "cpu_hotplug/functional/cpuhotplug05.sh" failed

Hi!
> ---
>  .../hotplug/cpu_hotplug/functional/cpuhotplug05.sh |    8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git 
> a/testcases/kernel/hotplug/cpu_hotplug/functional/cpuhotplug05.sh 
> b/testcases/kernel/hotplug/cpu_hotplug/functional/cpuhotplug05.sh
> index e64b91c..e893f04 100755
> --- a/testcases/kernel/hotplug/cpu_hotplug/functional/cpuhotplug05.sh
> +++ b/testcases/kernel/hotplug/cpu_hotplug/functional/cpuhotplug05.sh
> @@ -57,8 +57,8 @@ until [ $TST_COUNT -gt $TST_TOTAL ]; do
>         sleep 2
>         SAR_PID=$!
> 
> -       # Verify that SAR has correctly listed the missing CPU as 'nan'
> -       while ! grep -iq nan $TMP/log_$$; do
> +       # Verify that SAR has correctly listed the missing CPU
> +       while ! awk '{print $8}' $TMP/log_$$|grep -i "^0.00"; do
>                 tst_resm TFAIL "CPU${CPU_TO_TEST} Not Found on SAR!"
>                 exit_clean 1
>         done
> @@ -66,7 +66,7 @@ until [ $TST_COUNT -gt $TST_TOTAL ]; do
>         sleep .5
> 
>         # Verify that at least some of the CPUs are offline
> -       NUMBER_CPU_OFF=$(grep "$time" $TMP/log_$$ | grep -i nan | wc -l)
> +        NUMBER_CPU_OFF=$(grep "$time" $TMP/log_$$ | awk '{print $8}' 
> + |grep -i "^0.00" | wc -l)
>         if [ ${NUMBER_CPU_OFF} -eq 0 ]; then
>                 tst_resm TBROK "no CPUs found offline"
>                 exit_clean 1
> @@ -83,7 +83,7 @@ until [ $TST_COUNT -gt $TST_TOTAL ]; do
>         sleep .5
> 
>         # Check that SAR registered the change in CPU online/offline states
> -       NEW_NUMBER_CPU_OFF=$(grep "$time" $TMP/log_$$ | grep -i nan | wc -l)
> +        NEW_NUMBER_CPU_OFF=$(grep "$time" $TMP/log_$$|awk '{print 
> + $8}'|grep -i "^0.00"| wc -l)
>         : $(( NUMBER_CPU_OFF -= 1 ))
>         if [ "$NUMBER_CPU_OFF" = "$NEW_NUMBER_CPU_OFF" ]; then
>                 tst_resm TPASS "CPU was found after turned on."

Ok, that fixes it for sar that does not print nan. Do you have an idea for how 
long the sar behaves this way?

Because I do not wan't to break the test for anybody with slightly older 
sasstat package.

--
Cyril Hrubis
[email protected]



------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135031&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to