From: <ch...@su...> - 2013-10-17 12:52:47
|
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 ch...@su... |