Hi!
> diff --git
> a/testcases/kernel/hotplug/cpu_hotplug/include/cpuhotplug_hotplug.sh
> b/testcases/kernel/hotplug/cpu_hotplug/include/cpuhotplug_hotplug.sh
> index 6920393..be8bce2 100644
> --- a/testcases/kernel/hotplug/cpu_hotplug/include/cpuhotplug_hotplug.sh
> +++ b/testcases/kernel/hotplug/cpu_hotplug/include/cpuhotplug_hotplug.sh
> @@ -165,11 +165,11 @@ get_present_cpus()
>
> # get_present_cpus_num()
> #
> -# Prints the number of present CPUs
> +# Gets the number of present CPUs
> #
> get_present_cpus_num()
> {
> - return $(get_present_cpus | wc -w)
> + PRESENT_CPUS_NUM=`get_present_cpus | wc -w`
> }
Passing the value by global variable is ugly. Why don't we echo the
value here as:
echo $(get_present_cpus |wc -w), or even just call 'get_presnt_cpus |wc -w'
and do:
if [ $(get_present_cpus_num) -lt 2 ]; then
...
fi
in the testcases?
--
Cyril Hrubis
[email protected]
------------------------------------------------------------------------------
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list