[LTP] [PATCH 1/1] numa01.sh: Handle computation error

Li Wang liwang@redhat.com
Fri Jul 3 05:00:18 CEST 2020


Hi Petr, Harish,

Though the root cause is from the non-ordered node in a special machine, I
still think this patch makes sense to numa01, because the function
get_mem_cur() make code more readable.

So I'm going to merge both this one and Harish's patch, after doing that, I
will also follow Cyril's comment to remove test8(migrate_pages).

Any objections? or comments?

On Thu, Jul 2, 2020 at 7:31 AM Petr Vorel <petr.vorel@gmail.com> wrote:

> ...
> +get_mem_cur()
>  {
>         local pid=$1
>         local node=$(($2 + 2))
> +       local size=$3
> +       local numstat=$(numastat -p $pid |awk '/^Total/ {print $'$node'}')
>
> -       echo $(numastat -p $pid |awk '/^Total/ {print $'$node'}')
> +       if [ -z "$numstat" ]; then
> +               echo 0
> +               return
>

Maybe we'd better do TBROK from here if numstat doesn't work well?

-- 
Regards,
Li Wang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linux.it/pipermail/ltp/attachments/20200703/6552fbff/attachment.htm>


More information about the ltp mailing list