From: Jin Li <[email protected]>

Check whether sar is available befor run test

Signed-off-by: Jin Li <[email protected]>
---
 testcases/kernel/hotplug/cpu_hotplug/functional/cpuhotplug05.sh | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/testcases/kernel/hotplug/cpu_hotplug/functional/cpuhotplug05.sh 
b/testcases/kernel/hotplug/cpu_hotplug/functional/cpuhotplug05.sh
index ad57efe..e64b91c 100755
--- a/testcases/kernel/hotplug/cpu_hotplug/functional/cpuhotplug05.sh
+++ b/testcases/kernel/hotplug/cpu_hotplug/functional/cpuhotplug05.sh
@@ -27,6 +27,11 @@ Desc:   Does sar behave properly during CPU hotplug events?
 
 EOF
 
+which sar > /dev/null 2>&1 || {
+        tst_resm TCONF "sar does not exist"
+        exit_clean 1
+}
+
 # Verify the specified CPU is available
 if ! cpu_is_valid "${CPU_TO_TEST}" ; then
        tst_resm TBROK"CPU${CPU_TO_TEST} not found"
-- 
1.7.11


------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_nov
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to