From: Cyril Hrubis <chrubis@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH] controllers/cpuset_base_ops_testset.sh: Accept either 0 or -EINVAL when passing '0-'
Date: Wed, 30 Sep 2020 12:47:09 +0200 [thread overview]
Message-ID: <20200930104709.GC6611@yuki.lan> (raw)
In-Reply-To: <20200929025606.322543-1-yangx.jy@cn.fujitsu.com>
Hi!
> When we write '0-' to cpuset.cpus/cpuset.mems, new bitmap_parselist()
> in kernel(e.g. newer than v4.2) treats it as an invalid value and old
> one treats it as a valid '0':
> -------------------------------------------
> on v5.8.0:
> # echo 0- > cpuset.cpus
> -bash: echo: write error: Invalid argument
> # echo 0- > cpuset.mems
> -bash: echo: write error: Invalid argument
>
> on v4.0.0:
> # echo '0-' >cpuset.cpus
> # cat cpuset.cpus
> 0
> # echo '0-' >cpuset.mems
> # cat cpuset.cpus
> 0
> -------------------------------------------
> Note: commit d9282cb66353b changes the behavior.
>
> Drop the check of kernel version and accept either 0 or -EINVAL
> because the change of behavior can be backported into old kernel.
Why can't we just simply adjust the kernel check, it looks like the
commit you mentioned was added to 4.3 so it should be fixed by changing
the line to:
if tst_kvcmp -lt "4.3 RHEL6:2.6.32"; then
We want to at least keep the check for kernels newer than 4.3 just to
make sure that kernel keeps rejecting the '0-' invalid value.
--
Cyril Hrubis
chrubis@suse.cz
next prev parent reply other threads:[~2020-09-30 10:47 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-29 2:56 [LTP] [PATCH] controllers/cpuset_base_ops_testset.sh: Accept either 0 or -EINVAL when passing '0-' Xiao Yang
2020-09-30 10:47 ` Cyril Hrubis [this message]
2020-09-30 12:27 ` Xiao Yang
2020-09-30 12:40 ` Cyril Hrubis
2020-09-30 12:58 ` Xiao Yang
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=20200930104709.GC6611@yuki.lan \
--to=chrubis@suse.cz \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox