All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yang Xu <xuyang2018.jy@cn.fujitsu.com>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH v3 1/2] cpuset: skip test when cpu or nodes are not numbered continuously from 0
Date: Wed, 20 Jan 2021 09:45:37 +0800	[thread overview]
Message-ID: <60078B41.4020906@cn.fujitsu.com> (raw)
In-Reply-To: <YAbAvorwMJUaeIGP@pevik>

Hi Petr
> Hi Xu,
>
>>> These cpuset cases(cpuset_base_ops_test, cpuset_hierarchy_test, cpuset_inherit_test...)
>>> seem all not consider the situation(cpus/memory are not numbered continuously). It is
>>> continuously from 0 as default. Skip test if there are not numbered continuously to
>>> avoid unexpected error.
>
>>> This patch also fix cpu_inherit error by using original mem value.
>
>>> cpuset_inherit case fails on 4 numa nodes pc, as below:
>>> cpuset_inherit 1 TPASS: cpus: Inherited information is right!
>>> cpuset_inherit 3 TPASS: cpus: Inherited information is right!
>>> cpuset_inherit 5 TPASS: cpus: Inherited information is right!
>>> cpuset_inherit 7 TPASS: cpus: Inherited information is right!
>>> cpuset_inherit 9 TPASS: cpus: Inherited information is right!
>>> cpuset_inherit 11 TPASS: cpus: Inherited information is right!
>>> cpuset_inherit 13 TPASS: mems: Inherited information is right!
>>> cpuset_inherit 15 TPASS: mems: Inherited information is right!
>>> cpuset_inherit 17 TPASS: mems: Inherited information is right!
>>> cpuset_inherit 19 TPASS: mems: Inherited information is right!
>>> cpuset_inherit 21 TPASS: mems: Inherited information is right!
>>> cpuset_inherit 23 TFAIL: mems: Test result - 0-3 Expected string - "4"
>
> Good catch :).
>
> BTW how this happen? hot-unplug on lpar?
> Maybe add brief note about it into commit message.
I have added it and merged this patchset, thanks for you and cyril's review.
>
> Reviewed-by: Petr Vorel<pvorel@suse.cz>
>
> ...
>>> +++ b/testcases/kernel/controllers/cpuset/cpuset_funcs.sh
>>> @@ -26,23 +26,34 @@
>
>>>    . test.sh
>
>>> +cpu_string="`cat /sys/devices/system/cpu/online`"
>>>    NR_CPUS=`tst_ncpus`
>>> +
>>>    if [ -f "/sys/devices/system/node/has_high_memory" ]; then
>>> -	N_NODES="`cat /sys/devices/system/node/has_high_memory | tr ',' ' '`"
>>> +	mem_string="`cat /sys/devices/system/node/has_high_memory`"
>>>    else
>>> -	N_NODES="`cat /sys/devices/system/node/has_normal_memory | tr ',' ' '`"
>>> +	mem_string="`cat /sys/devices/system/node/has_normal_memory`"
>>>    fi
>>> +N_NODES="`echo $mem_string | tr ',' ' '`"
>
> nit: I'd personally do:
>
> f="/sys/devices/system/node/has_high_memory"
> [ -f "$f" ] || f="/sys/devices/system/node/has_normal_memory"
> N_NODES="$(cat $f | tr ',' ' ')"
>
> but that's a tiny detail.
>
> It'd be great to rewrite these tests into C.
Yes, I will create a issue to avoid we forget this.
>
> Kind regards,
> Petr
>
>
> .
>




  reply	other threads:[~2021-01-20  1:45 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-30  2:06 [LTP] [PATCH] cpuset_inherit: Use the original mem value instead of N_NODES Yang Xu
2021-01-08 13:26 ` Cyril Hrubis
2021-01-11  9:04   ` Yang Xu
2021-01-12 10:44     ` Yang Xu
2021-01-12 15:17       ` Cyril Hrubis
2021-01-13  9:24         ` Yang Xu
2021-01-13 12:03         ` [LTP] [PATCH v2] cpuset: skip test when cpu or nodes are not numbered continously from 0 Yang Xu
2021-01-13 16:23           ` Cyril Hrubis
2021-01-14  1:40             ` Yang Xu
2021-01-14  2:18             ` [LTP] [PATCH v3 1/2] cpuset: skip test when cpu or nodes are not numbered continuously " Yang Xu
2021-01-14  2:18               ` [LTP] [PATCH v3 2/2] cpuset_inherit: Remove redundant cpu_string assignment Yang Xu
2021-01-19 11:22                 ` Petr Vorel
2021-01-19 11:51                 ` Cyril Hrubis
2021-01-18  8:16               ` [LTP] [PATCH v3 1/2] cpuset: skip test when cpu or nodes are not numbered continuously from 0 Yang Xu
2021-01-19 11:21                 ` Petr Vorel
2021-01-20  1:45                   ` Yang Xu [this message]
2021-01-19 11:50               ` Cyril Hrubis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=60078B41.4020906@cn.fujitsu.com \
    --to=xuyang2018.jy@cn.fujitsu.com \
    --cc=ltp@lists.linux.it \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.