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

Wanlong Gao
2012-11-14T06:39:30Z

On 11/12/2012 03:34 PM, jin.li@windriver.com wrote:
> From: Jin Li <jin.li@windriver.com>
>
> Check whether sar is available befor run test

This is OK to me.

Thanks,
Wanlong Gao

>
> 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"