Re: [PATCH v1] set_mempolicy05: Require CONFIG_NUMA using .needs_kconfigs

Wei Gao via ltp <[email protected]>
Newsgroups gmane.linux.ltp
Message-ID <CAJs-1pX1F6+=G=XUBEOBaP9VM7RoCEeLLQuthtUG9HaZMguW-A@mail.gmail.com>
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

On Fri, Jun 26, 2026 at 5:13 PM Wei Gao <[email protected]> wrote:

> 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 <[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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.