<div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-family:monospace"><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Jul 30, 2021 at 10:03 AM Li Wang <<a href="mailto:liwang@redhat.com">liwang@redhat.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div style="font-size:small"><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jul 29, 2021 at 10:20 PM Jan Stancek <<a href="mailto:jstancek@redhat.com" target="_blank">jstancek@redhat.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div style="font-family:monospace"><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jul 29, 2021 at 3:25 PM Li Wang <<a href="mailto:liwang@redhat.com" target="_blank">liwang@redhat.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Signed-off-by: Li Wang <<a href="mailto:liwang@redhat.com" target="_blank">liwang@redhat.com</a>><br>
---<br>
testcases/kernel/syscalls/mbind/mbind01.c | 25 ++++++++++++++++++++---<br>
1 file changed, 22 insertions(+), 3 deletions(-)<br>
<br>
diff --git a/testcases/kernel/syscalls/mbind/mbind01.c b/testcases/kernel/syscalls/mbind/mbind01.c<br>
index d2cf13c8f..b5c1e948d 100644<br>
--- a/testcases/kernel/syscalls/mbind/mbind01.c<br>
+++ b/testcases/kernel/syscalls/mbind/mbind01.c<br>
@@ -34,7 +34,7 @@ static struct bitmask *nodemask, *getnodemask, *empty_nodemask;<br>
static void test_default(unsigned int i, char *p);<br>
static void test_none(unsigned int i, char *p);<br>
static void test_invalid_nodemask(unsigned int i, char *p);<br>
-static void check_policy_pref_no_target(int);<br>
+static void check_policy_pref_or_local(int);<br>
<br>
struct test_case {<br>
int policy;<br>
@@ -92,7 +92,7 @@ static struct test_case tcase[] = {<br>
.ret = 0,<br>
.err = 0,<br>
.test = test_none,<br>
- .check_policy = check_policy_pref_no_target,<br>
+ .check_policy = check_policy_pref_or_local,<br>
},<br>
{<br>
POLICY_DESC(MPOL_PREFERRED),<br>
@@ -101,6 +101,20 @@ static struct test_case tcase[] = {<br>
.test = test_default,<br>
.exp_nodemask = &nodemask,<br>
},<br>
+ {<br>
+ POLICY_DESC(MPOL_LOCAL),<br>
+ .ret = 0,<br>
+ .err = 0,<br>
+ .test = test_none,<br>
+ .exp_nodemask = &empty_nodemask,<br>
+ .check_policy = check_policy_pref_or_local,<br></blockquote><div><br></div><div><div style="font-family:monospace">This is a bit more permissive, it allows for MPOL_LOCAL to return also MPOL_PREFERRED.</div><div style="font-family:monospace">
</div><div style="font-family:monospace">Shouldn't that still be treated as error?</div></div></div></div></blockquote><div><br></div><div><div style="font-size:small">To strictly this should be an error.</div><div style="font-size:small"><br></div></div><span class="gmail_default" style="font-size:small">But </span>I <span class="gmail_default" style="font-size:small">slightly think</span> that<span class="gmail_default" style="font-size:small"> it's</span> acceptable <span class="gmail_default" style="font-size:small">to</span> get 'MPOL_PREFERRED'<span class="gmail_default" style="font-size:small"> </span>on<span class="gmail_default" style="font-size:small"> the old</span></div><div class="gmail_quote"><span class="gmail_default" style="font-size:small">kernel (i.e. 4.18</span><span class="gmail_default" style="font-size:small">.0, v5.13) </span><span class="gmail_default">because</span> 'MPOL_LOCAL' is not treated as a real policy.</div><div class="gmail_quote"><div style="font-size:small">And the situation exists for quite a long time.</div></div></div></blockquote><div><br></div><div><div style="font-family:monospace" class="gmail_default">You're right, on older kernel it failed in similar way for MPOL_LOCAL</div><div style="font-family:monospace" class="gmail_default">as it failed for MPOL_PREFERRED on latest one.</div><div style="font-family:monospace" class="gmail_default"><br></div><div style="font-family:monospace" class="gmail_default">Acked-by: Jan Stancek <<a href="mailto:jstancek@redhat.com">jstancek@redhat.com</a>></div><div style="font-family:monospace" class="gmail_default"><br></div></div></div></div>