Applied with Cyril's ack, thanks.

On 05/18/2015 10:18 PM, Chase Qi wrote:
> * Comparing with 24-hour time format, string "AM" or "PM" will be added when
> 12-hour time format is using, "08:55:08 PM" for example. Depending on the time
> format, the number of columns of sar output vary, it might cause invalid test
> result. Set "LC_TIME" to "POSIX" to unify sar output.
> 
> * "sar 1 0" and "sar -P ALL 1 0" are not valid usage of sar now, change them 
> to
> "sar 1" and "sar -P ALL 1" respectively.
> 
> * The current 1 second sleep time after CPU online command is not enough for
> slower hardware, it might cause invalid test result. Increase it to 2 seconds 
> to
> adapt slow hardware.
> 
> Signed-off-by: Chase Qi <chase...@linaro.org>
> ---
>  .../kernel/hotplug/cpu_hotplug/functional/cpuhotplug05.sh   | 13 
> +++++++------
>  1 file changed, 7 insertions(+), 6 deletions(-)
> 
> diff --git a/testcases/kernel/hotplug/cpu_hotplug/functional/cpuhotplug05.sh 
> b/testcases/kernel/hotplug/cpu_hotplug/functional/cpuhotplug05.sh
> index bb0e896..f088d25 100755
> --- a/testcases/kernel/hotplug/cpu_hotplug/functional/cpuhotplug05.sh
> +++ b/testcases/kernel/hotplug/cpu_hotplug/functional/cpuhotplug05.sh
> @@ -5,6 +5,7 @@
>  
>  export TCID="cpuhotplug05"
>  export TST_TOTAL=1
> +export LC_TIME="POSIX"
>  
>  # Includes:
>  . test.sh
> @@ -80,11 +81,11 @@ TST_CLEANUP=do_clean
>  until [ $LOOP_COUNT -gt $HOTPLUG05_LOOPS ]; do
>  
>       # Start up SAR and give it a couple cycles to run
> -     sar 1 0 &>/dev/null &
> +     sar 1 &>/dev/null &
>       sleep 2
>       if ps -C sar &>/dev/null; then
>               pkill sar
> -             sar -P ALL 1 0 > $TMP/log_$$ &
> +             sar -P ALL 1 > $TMP/log_$$ &
>       else
>               sar -P ALL 1 > $TMP/log_$$ &
>       fi
> @@ -92,14 +93,14 @@ until [ $LOOP_COUNT -gt $HOTPLUG05_LOOPS ]; do
>       SAR_PID=$!
>  
>       # Verify that SAR has correctly listed the missing CPU
> -     while ! awk '{print $9}' $TMP/log_$$ | grep -i "^0.00"; do
> +     while ! awk '{print $8}' $TMP/log_$$ | grep -i "^0.00"; do
>               tst_brkm TBROK "CPU${CPU_TO_TEST} Not Found on SAR!"
>       done
>       time=`date +%X`
>       sleep .5
>  
>       # Verify that at least some of the CPUs are offline
> -     NUMBER_CPU_OFF=$(grep "$time" $TMP/log_$$ | awk '{print $9}' \
> +     NUMBER_CPU_OFF=$(grep "$time" $TMP/log_$$ | awk '{print $8}' \
>               |grep -i "^0.00" | wc -l)
>       if [ ${NUMBER_CPU_OFF} -eq 0 ]; then
>               tst_brkm TBROK "no CPUs found offline"
> @@ -110,12 +111,12 @@ until [ $LOOP_COUNT -gt $HOTPLUG05_LOOPS ]; do
>               tst_brkm TBROK "CPU${CPU_TO_TEST} cannot be onlined line"
>       fi
>  
> -     sleep 1
> +     sleep 2
>       time=$(date +%T)
>       sleep .5
>  
>       # Check that SAR registered the change in CPU online/offline states
> -     NEW_NUMBER_CPU_OFF=$(grep "$time" $TMP/log_$$|awk '{print $9}' \
> +     NEW_NUMBER_CPU_OFF=$(grep "$time" $TMP/log_$$|awk '{print $8}' \
>               | grep -i "^0.00"| wc -l)
>       NUMBER_CPU_OFF=$((NUMBER_CPU_OFF-1))
>       if [ "$NUMBER_CPU_OFF" != "$NEW_NUMBER_CPU_OFF" ]; then
> 


------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to