In commit 841c0eebc50068d6595b97b50ae0ee8e8f57c8ca:
We changed "sar 1 0" to "sar 1", but it make the test not
work well before 'sysstat-8.1.4(include sar)'.

Signed-off-by: Zeng Linggang <zenglg...@cn.fujitsu.com>
---
 .../kernel/hotplug/cpu_hotplug/functional/cpuhotplug05.sh      | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/testcases/kernel/hotplug/cpu_hotplug/functional/cpuhotplug05.sh 
b/testcases/kernel/hotplug/cpu_hotplug/functional/cpuhotplug05.sh
index 4491d3a..8a0f13b 100755
--- a/testcases/kernel/hotplug/cpu_hotplug/functional/cpuhotplug05.sh
+++ b/testcases/kernel/hotplug/cpu_hotplug/functional/cpuhotplug05.sh
@@ -81,11 +81,17 @@ TST_CLEANUP=do_clean
 until [ $LOOP_COUNT -gt $HOTPLUG05_LOOPS ]; do
 
        # Start up SAR and give it a couple cycles to run
-       sar 1 &>/dev/null &
+       sar 1 0 &>/dev/null &
+       if [ $? -ne 0 ]; then
+               sar 1 &>/dev/null &
+       fi
        sleep 2
        if ps -C sar &>/dev/null; then
                pkill sar
-               sar -P ALL 1 > $TMP/log_$$ &
+               sar -P ALL 1 0 > $TMP/log_$$ &
+               if [ $? -ne 0 ]; then
+                       sar -P ALL 1 > $TMP/log_$$ &
+               fi
        else
                sar -P ALL 1 > $TMP/log_$$ &
        fi
-- 
1.9.3




------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to