[LTP] [PATCH 3/3] Fix cpuhotplug test case cpuhotplug05

jin.li
2012-11-12T07:34:18Z

From: Jin Li <jin.li@windriver.com>

Check whether sar is available befor run test

Signed-off-by: Jin Li <jin.li@windriver.com>
---
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: