<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#ffffff" text="#000000">
    On 2020/9/30 18:47, Cyril Hrubis wrote:
    <blockquote cite="mid:20200930104709.GC6611@yuki.lan" type="cite">
      <pre wrap="">Hi!
</pre>
      <blockquote type="cite">
        <pre wrap="">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.
</pre>
      </blockquote>
      <pre wrap="">
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.
</pre>
    </blockquote>
    Hi Cyril,<br>
    <br>
    Thanks for your reply. <span class="moz-smiley-s1"><span> :-) </span></span><br>
    1) I still got '0' value instead of -EINVAL on Centos
    6.10(2.6.32-754) so not sure why we have the wrong kernel check
    before.<br>
        Perhaps, is there anothe older kernel commit to change the
    behavior as well?<br>
    2) I don't think that kernel check is enough because  the change of
    behavior may be backported into old kernel.<br>
    <br>
    How about removing the combination directly as Richard suggested on
    #695.<br>
    <br>
    Best Regards,<br>
    Xiao Yang<br>
    <span style="display: inline ! important; float: none;
      background-color: rgb(255, 255, 255); color: rgb(51, 51, 51);
      font: 13px/21px Arial,sans-serif; letter-spacing: normal; orphans:
      2; text-align: left; text-decoration: none; text-indent: 0px;
      text-transform: none; white-space: normal; word-spacing: 0px;"></span>
  </body>
</html>