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)'. The former code has used
"ps -C sar" to check, so restore them and add some comments to remind
users.

Signed-off-by: Zeng Linggang <zenglg...@cn.fujitsu.com>
---
 testcases/kernel/hotplug/cpu_hotplug/functional/cpuhotplug05.sh | 6 ++++--
 1 file changed, 4 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..60382c8 100755
--- a/testcases/kernel/hotplug/cpu_hotplug/functional/cpuhotplug05.sh
+++ b/testcases/kernel/hotplug/cpu_hotplug/functional/cpuhotplug05.sh
@@ -81,11 +81,13 @@ 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 &
        sleep 2
+       # "sar 1 0" is supported before 'sysstat-8.1.4(include sar)',
+       # after that use "sar 1" instead of. Use 'ps -C sar' to check.
        if ps -C sar &>/dev/null; then
                pkill sar
-               sar -P ALL 1 > $TMP/log_$$ &
+               sar -P ALL 1 0 > $TMP/log_$$ &
        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