Skip to contentSkip to conversation

set_mempolicy05: Require CONFIG_NUMA using .needs_kconfigs

PATCH In review Wei Gao via ltp 1 participant 3 messages Jun 26

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 set_mempolicy05: Require CONFIG_NUMA using .needs_kconfigs

When CONFIG_NUMA is disabled in the kernel, the set_mempolicy system call is not compiled and returns -ENOSYS.

Declare CONFIG_NUMA in the .needs_kconfigs field of struct tst_test. This ensures that the test cleanly skips (TCONF) on kernels built without NUMA support, preventing false TFAIL results.

---
 testcases/kernel/syscalls/set_mempolicy/set_mempolicy05.c | 4 ++++
 1 file changed, 4 insertions(+)
testcases/kernel/syscalls/set_mempolicy/set_mempolicy05.c +4 -0
index 7481dcd8d..e9c521df2 100644
@@ -115,6 +115,10 @@ static struct tst_test test = {
 		"ppc",
 		NULL
 	},
+	.needs_kconfigs = (const char *const []) {
+		"CONFIG_NUMA",
+		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
#1 lore raw

Hi ALL

Sorry , please ignore this duplicate patch since we already have
https://patchwork.ozlabs.org/project/ltp/patch/[email protected]/

Thanks.
Regards
Gao Wei

Quoted 32 lines · Wei Gao

When CONFIG_NUMA is disabled in the kernel, the set_mempolicy system call is not compiled and returns -ENOSYS.

Declare CONFIG_NUMA in the .needs_kconfigs field of struct tst_test. This ensures that the test cleanly skips (TCONF) on kernels built without NUMA support, preventing false TFAIL results.

---
 testcases/kernel/syscalls/set_mempolicy/set_mempolicy05.c | 4 ++++
 1 file changed, 4 insertions(+)
testcases/kernel/syscalls/set_mempolicy/set_mempolicy05.c +4 -1
index 7481dcd8d..e9c521df2 100644
@@ -115,6 +115,10 @@ static struct tst_test test = {
                "ppc",
                NULL
        },
+       .needs_kconfigs = (const char *const []) {
+               "CONFIG_NUMA",
+               NULL
+       },
        .tags = (const struct tst_tag[]) {
                {"linux-git", "cf01fb9985e8"},
                {"CVE", "2017-7616"},
--

2.54.0

Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
#2 lore raw

Hi Wei,

this patch is duplicating what Avinesh was already fixing, so I will wait for his feedback and reject this one.

Regards,
--
Andrea Cervesato
SUSE QE Automation Engineer Linux
[email protected]

Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp