[PATCH v1] set_mempolicy05: Require CONFIG_NUMA using .needs_kconfigs
Wei Gao via ltp <[email protected]>
| Newsgroups | gmane.linux.ltp |
|---|---|
| Message-ID | <[email protected]> |
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. Signed-off-by: Wei Gao <wegao-IBi9RG/[email protected]> --- testcases/kernel/syscalls/set_mempolicy/set_mempolicy05.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/testcases/kernel/syscalls/set_mempolicy/set_mempolicy05.c b/testcases/kernel/syscalls/set_mempolicy/set_mempolicy05.c index 7481dcd8d..e9c521df2 100644 --- a/testcases/kernel/syscalls/set_mempolicy/set_mempolicy05.c +++ b/testcases/kernel/syscalls/set_mempolicy/set_mempolicy05.c @@ -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 -- Mailing list info: https://lists.linux.it/listinfo/ltp