set_mempolicy05: require CONFIG_NUMA
PATCH 1/1 set_mempolicy05: require CONFIG_NUMA
On kernels without CONFIG_NUMA=y set_mempolicy() returns ENOSYS, which the test misreports as TFAIL.
set_mempolicy05.c:105: TFAIL: set_mempolicy should fail with EFAULT or EINVAL, instead returned 38
Add .needs_kconfigs with CONFIG_NUMA=y
--- testcases/kernel/syscalls/set_mempolicy/set_mempolicy05.c | 4 ++++ 1 file changed, 4 insertions(+)
testcases/kernel/syscalls/set_mempolicy/set_mempolicy05.c +4 -0
@@ -115,6 +115,10 @@ static struct tst_test test = { "ppc",NULL }, + .needs_kconfigs = (const char *const []){ +"CONFIG_NUMA=y" , +NULL + }, .tags = (const struct tst_tag []) { {"linux-git" ,"cf01fb9985e8" }, {"CVE" ,"CVE-2017-7616" },
Signature · 5 lines
2.54.0 -- Mailing list info: https://lists.linux.it/listinfo/ltp
Hi Avinesh,
Quoted 1 line · Avinesh Kumar
set_mempolicy05: requireCONFIG_NUMA
Verdict - Reviewed
---
Note:
The agent can sometimes produce false positives although often its findings are genuine. If you find issues with the review, please comment this email or ignore the suggestions.
Regards,
LTP AI Reviewer
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
Hi Avinesh,
the patch looks good to me, but it's probably not enough. we will need to implement the same concept for all set_mempolicy() tests, since it's NUMA specific. We just missed this for all this time apparently. Did you see the same errors for them as well?
Regards,
--
Andrea Cervesato
SUSE QE Automation Engineer Linux
[email protected]
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
Hi Andrea,
Quoted 6 lines · Andrea Cervesato via ltp
Hi Avinesh,
the patch looks good to me, but it's probably not enough. we will need to implement the same concept for all
set_mempolicy()tests, since it's NUMA specific. We just missed this for all this time apparently. Did you see the same errors for them as well?
Thanks for the review. Remaining set_mempolicy tests are checking for minimum two NUMA nodes and hence reports
tse_numa.c:200: TINFO: Found 1 NUMA memory nodes
tse_numa.c:141: TINFO: File '/sys/devices/system/node/node0/meminfo' does not exist! NUMA not enabled? get_mempolicy02.c:60: TCONF: test requires at least one NUMA memory node
even on systems without CONFIG_NUMA=y.
But I also think that we should addCONFIG_NUMA=y check in all these tests. Please confirm, I will send revised version.
Regards,
Avinesh
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
Quoted 3 lines
But I also think that we should add
CONFIG_NUMA=ycheck in all these tests. Please confirm, I will send revised version.
Yes please, let's fix them all already.
Thanks,
--
Andrea Cervesato
SUSE QE Automation Engineer Linux
[email protected]
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
PATCH v2 1/1 set_mempolicy: require CONFIG_NUMA
From: Avinesh Kumar <[email protected]>
On kernels without CONFIG_NUMA=y set_mempolicy() returns ENOSYS, which the test misreports as TFAIL.
set_mempolicy05 -
set_mempolicy05.c:105: TFAIL: set_mempolicy should fail with EFAULT or EINVAL, instead returned 38
remaining of these tests (set_mempolicy[01-04]) checks for minimum two NUMA nodes and reports TCONF, but those also should exit on CONFIG_NUMA check.
tse_numa.c:200: TINFO: Found 1 NUMA memory nodes
tse_numa.c:141: TINFO: File '/sys/devices/system/node/node0/meminfo' does not exist! NUMA not enabled? get_mempolicy02.c:60: TCONF: test requires at least one NUMA memory node
Add .needs_kconfigs with CONFIG_NUMA=y
--- testcases/kernel/syscalls/set_mempolicy/set_mempolicy01.c | 4 ++++ testcases/kernel/syscalls/set_mempolicy/set_mempolicy02.c | 4 ++++ testcases/kernel/syscalls/set_mempolicy/set_mempolicy03.c | 4 ++++ testcases/kernel/syscalls/set_mempolicy/set_mempolicy04.c | 4 ++++ testcases/kernel/syscalls/set_mempolicy/set_mempolicy05.c | 4 ++++ 5 files changed, 20 insertions(+)
testcases/kernel/syscalls/set_mempolicy/set_mempolicy01.c +4 -0
@@ -120,6 +120,10 @@ static struct tst_test test = { .forks_child = 1, .needs_checkpoints = 1, .timeout = 600, + .needs_kconfigs = (const char *const []){ +"CONFIG_NUMA=y" , +NULL + } };#else
testcases/kernel/syscalls/set_mempolicy/set_mempolicy02.c +4 -0
@@ -109,6 +109,10 @@ static struct tst_test test = { .tcnt = 2, .forks_child = 1, .needs_checkpoints = 1, + .needs_kconfigs = (const char *const []){ +"CONFIG_NUMA=y" , +NULL + } };#else
testcases/kernel/syscalls/set_mempolicy/set_mempolicy03.c +4 -0
@@ -103,6 +103,10 @@ static struct tst_test test = { .mntpoint = MNTPOINT, .forks_child = 1, .needs_checkpoints = 1, + .needs_kconfigs = (const char *const []){ +"CONFIG_NUMA=y" , +NULL + } };#else
testcases/kernel/syscalls/set_mempolicy/set_mempolicy04.c +4 -0
@@ -134,6 +134,10 @@ static struct tst_test test = { .all_filesystems = 1, .mntpoint = MNTPOINT, .needs_checkpoints = 1, + .needs_kconfigs = (const char *const []){ +"CONFIG_NUMA=y" , +NULL + } };#else
testcases/kernel/syscalls/set_mempolicy/set_mempolicy05.c +4 -0
@@ -115,6 +115,10 @@ static struct tst_test test = { "ppc",NULL }, + .needs_kconfigs = (const char *const []){ +"CONFIG_NUMA=y" , +NULL + }, .tags = (const struct tst_tag []) { {"linux-git" ,"cf01fb9985e8" }, {"CVE" ,"CVE-2017-7616" },
Signature · 5 lines
2.54.0 -- Mailing list info: https://lists.linux.it/listinfo/ltp
Re: [LTP] [PATCH v2] set_mempolicy: require CONFIG_NUMA
Hi Avinesh,
the patch doesn't apply on the main branch. Please send a new patch version.
https://github.com/linux-test-project/ltp/actions/runs/28183890018
Regards,
--
Andrea Cervesato
SUSE QE Automation Engineer Linux
[email protected]
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
PATCH v3 1/1 set_mempolicy: require CONFIG_NUMA
From: Avinesh Kumar <[email protected]>
On kernels without CONFIG_NUMA=y set_mempolicy() returns ENOSYS, which the test misreports as TFAIL.
set_mempolicy05 -
set_mempolicy05.c:105: TFAIL: set_mempolicy should fail with EFAULT or EINVAL, instead returned 38
remaining of these tests (set_mempolicy[01-04]) checks for minimum two NUMA nodes and reports TCONF, but those also should exit on CONFIG_NUMA check.
tse_numa.c:200: TINFO: Found 1 NUMA memory nodes
tse_numa.c:141: TINFO: File '/sys/devices/system/node/node0/meminfo' does not exist! NUMA not enabled? get_mempolicy02.c:60: TCONF: test requires at least one NUMA memory node
Add .needs_kconfigs with CONFIG_NUMA=y
--- testcases/kernel/syscalls/set_mempolicy/set_mempolicy01.c | 4 ++++ testcases/kernel/syscalls/set_mempolicy/set_mempolicy02.c | 4 ++++ testcases/kernel/syscalls/set_mempolicy/set_mempolicy03.c | 4 ++++ testcases/kernel/syscalls/set_mempolicy/set_mempolicy04.c | 4 ++++ testcases/kernel/syscalls/set_mempolicy/set_mempolicy05.c | 4 ++++ 5 files changed, 20 insertions(+)
testcases/kernel/syscalls/set_mempolicy/set_mempolicy01.c +4 -0
@@ -120,6 +120,10 @@ static struct tst_test test = { .forks_child = 1, .needs_checkpoints = 1, .timeout = 600, + .needs_kconfigs = (const char *const []){ +"CONFIG_NUMA=y" , +NULL + } };#else
testcases/kernel/syscalls/set_mempolicy/set_mempolicy02.c +4 -0
@@ -109,6 +109,10 @@ static struct tst_test test = { .tcnt = 2, .forks_child = 1, .needs_checkpoints = 1, + .needs_kconfigs = (const char *const []){ +"CONFIG_NUMA=y" , +NULL + } };#else
testcases/kernel/syscalls/set_mempolicy/set_mempolicy03.c +4 -0
@@ -103,6 +103,10 @@ static struct tst_test test = { .mntpoint = MNTPOINT, .forks_child = 1, .needs_checkpoints = 1, + .needs_kconfigs = (const char *const []){ +"CONFIG_NUMA=y" , +NULL + } };#else
testcases/kernel/syscalls/set_mempolicy/set_mempolicy04.c +4 -0
@@ -134,6 +134,10 @@ static struct tst_test test = { .all_filesystems = 1, .mntpoint = MNTPOINT, .needs_checkpoints = 1, + .needs_kconfigs = (const char *const []){ +"CONFIG_NUMA=y" , +NULL + } };#else
testcases/kernel/syscalls/set_mempolicy/set_mempolicy05.c +4 -0
@@ -115,6 +115,10 @@ static struct tst_test test = { "ppc",NULL }, + .needs_kconfigs = (const char *const []){ +"CONFIG_NUMA=y" , +NULL + }, .tags = (const struct tst_tag []) { {"linux-git" ,"cf01fb9985e8" }, {"CVE" ,"2017-7616" },
Signature · 5 lines
2.54.0 -- Mailing list info: https://lists.linux.it/listinfo/ltp
Re: [LTP] [PATCH v3] set_mempolicy: require CONFIG_NUMA
Quoted 33 lines · Avinesh Kumar via ltp
From: Avinesh Kumar <[email protected]>
On kernels without
CONFIG_NUMA=yset_mempolicy()returns ENOSYS, which the test misreports as TFAIL.
set_mempolicy05-set_mempolicy05.c:105: TFAIL:
set_mempolicyshould fail with EFAULT or EINVAL, instead returned 38remaining of these tests (set_mempolicy[01-04]) checks for minimum two NUMA nodes and reports TCONF, but those also should exit on
CONFIG_NUMAcheck.tse_numa.c:200: TINFO: Found 1 NUMA memory nodes
tse_numa.c:141: TINFO: File '/sys/devices/system/node/node0/meminfo' does not exist! NUMA not enabled? get_mempolicy02.c:60: TCONF: test requires at least one NUMA memory nodeAdd .needs_kconfigs with
CONFIG_NUMA=ySigned-off-by Avinesh Kumar <[email protected]>--- testcases/kernel/syscalls/set_mempolicy/set_mempolicy01.c | 4 ++++ testcases/kernel/syscalls/set_mempolicy/set_mempolicy02.c | 4 ++++ testcases/kernel/syscalls/set_mempolicy/set_mempolicy03.c | 4 ++++ testcases/kernel/syscalls/set_mempolicy/set_mempolicy04.c | 4 ++++ testcases/kernel/syscalls/set_mempolicy/set_mempolicy05.c | 4 ++++ 5 files changed, 20 insertions(+)testcases/kernel/syscalls/set_mempolicy/set_mempolicy01.c +0
-0
testcases/kernel/syscalls/set_mempolicy/set_mempolicy01.c static struct tst_test test = { · line 127
Quoted 8 lines
testcases/kernel/syscalls/set_mempolicy/set_mempolicy01.c +4
-0@@ -120,6 +120,10 @@ static struct tst_test test = { .forks_child = 1, .needs_checkpoints = 1, .timeout = 600, + .needs_kconfigs = (const char *const []){ +"CONFIG_NUMA=y" , +NULL + } };
I suppose we do not need "#ifdef HAVE_NUMA_V2" anymore in the code. Same for set_mempolicy02 etc
Quoted 68 lines
testcases/kernel/syscalls/set_mempolicy/set_mempolicy01.c +0
-0#else testcases/kernel/syscalls/set_mempolicy/set_mempolicy02.c +4
-0@@ -109,6 +109,10 @@ static struct tst_test test = { .tcnt = 2, .forks_child = 1, .needs_checkpoints = 1, + .needs_kconfigs = (const char *const []){ +"CONFIG_NUMA=y" , +NULL + } };#else testcases/kernel/syscalls/set_mempolicy/set_mempolicy03.c +4
-0@@ -103,6 +103,10 @@ static struct tst_test test = { .mntpoint = MNTPOINT, .forks_child = 1, .needs_checkpoints = 1, + .needs_kconfigs = (const char *const []){ +"CONFIG_NUMA=y" , +NULL + } };#else testcases/kernel/syscalls/set_mempolicy/set_mempolicy04.c +4
-0@@ -134,6 +134,10 @@ static struct tst_test test = { .all_filesystems = 1, .mntpoint = MNTPOINT, .needs_checkpoints = 1, + .needs_kconfigs = (const char *const []){ +"CONFIG_NUMA=y" , +NULL + } };#else testcases/kernel/syscalls/set_mempolicy/set_mempolicy05.c +4
-0@@ -115,6 +115,10 @@ static struct tst_test test = { "ppc",NULL }, + .needs_kconfigs = (const char *const []){ +"CONFIG_NUMA=y" , +NULL + }, .tags = (const struct tst_tag []) { {"linux-git" ,"cf01fb9985e8" }, {"CVE" ,"2017-7616" },Signature · 5 lines
2.54.0 -- Mailing list info: https://lists.linux.it/listinfo/ltp
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
Andrea Cervesato via ltp
Reviewed-by Andrea CervesatoRe: [LTP] [PATCH v3] set_mempolicy: require CONFIG_NUMA
Hi Wei,
Quoted 2 lines
I suppose we do not need "#ifdef
HAVE_NUMA_V2" anymore in the code. Same forset_mempolicy02etc
HAVE_NUMA_V2 is used to check if NUMA is available at user-space via libnuma or during LTP build via --with-numa option, so we need to keep it.
The patch is LGTM and we are ready to merge it.
--
Andrea Cervesato
SUSE QE Automation Engineer Linux
[email protected]
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
Re: [LTP] set_mempolicy: require CONFIG_NUMA
In reply to Avinesh Kumar via ltpHi Avinesh,
Quoted 3 lines · Avinesh Kumar
set_mempolicy: requireCONFIG_NUMAset_mempolicy05.c:105: TFAIL:
set_mempolicyshould fail with EFAULT or EINVAL, instead returned 38
These log output lines have trailing whitespace. checkpatch flags them as errors. Could you strip the trailing spaces from the commit message?
Verdict - Needs revision
---
Note:
The agent can sometimes produce false positives although often its findings are genuine. If you find issues with the review, please comment this email or ignore the suggestions.
Regards,
LTP AI Reviewer
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
Andrea Cervesato via ltp
AppliedRe: [LTP] [PATCH v3] set_mempolicy: require CONFIG_NUMA
In reply to Avinesh Kumar via ltpMerged, Thanks!
--
Andrea Cervesato
SUSE QE Automation Engineer Linux
[email protected]
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp