From: Hari Bathini <hbathini@linux.ibm.com>
To: adubey@linux.ibm.com, linuxppc-dev@lists.ozlabs.org
Cc: bpf@vger.kernel.org, maddy@linux.ibm.com, ast@kernel.org,
andrii@kernel.org, daniel@iogearbox.net
Subject: Re: [PATCH v6 2/2] selftests/bpf: Enable private stack tests for powerpc64
Date: Tue, 31 Mar 2026 10:41:45 +0530 [thread overview]
Message-ID: <7b1c95ac-1c65-43b4-bfd4-1bf4ce895853@linux.ibm.com> (raw)
In-Reply-To: <20260331080309.173612-2-adubey@linux.ibm.com>
On 31/03/26 1:33 pm, adubey@linux.ibm.com wrote:
> From: Abhishek Dubey <adubey@linux.ibm.com>
>
> With support of private stack, relevant tests must pass
> on powerpc64.
>
> #./test_progs -t struct_ops_private_stack
> #434/1 struct_ops_private_stack/private_stack:OK
> #434/2 struct_ops_private_stack/private_stack_fail:OK
> #434/3 struct_ops_private_stack/private_stack_recur:OK
> #434 struct_ops_private_stack:OK
> Summary: 1/3 PASSED, 0 SKIPPED, 0 FAILED
>
> v5->v6:
> Remove unused label
> v4->v5:
> Rebase over latest branch
> v3->v4:
> No change
> v2->v3:
> Enable testcase using __powerpc64__ instead of __TARGET_ARCH_powerpc,
> to prevent it getting invoked on powerpc32
> v1->v2:
> No change
>
> [v5]: https://lore.kernel.org/bpf/20260330232034.44776-1-adubey@linux.ibm.com
> [v4]: https://lore.kernel.org/bpf/20260226031324.17352-1-adubey@linux.ibm.com
> [v3]: https://lore.kernel.org/bpf/20260226005440.9570-1-adubey@linux.ibm.com
> [v2]: https://lore.kernel.org/bpf/20260225153950.15331-1-adubey@linux.ibm.com
> [v1]: https://lore.kernel.org/bpf/20260216152234.36632-1-adubey@linux.ibm.com
The above changelog should go below the "---"
Also, selftest ML missing. That being said, the patch looks good.
Reviewed-by: Hari Bathini <hbathini@linux.ibm.com>
>
> Signed-off-by: Abhishek Dubey <adubey@linux.ibm.com>
> ---
> .../bpf/prog_tests/struct_ops_private_stack.c | 30 ++++++++-----------
> .../bpf/progs/struct_ops_private_stack.c | 6 ----
> .../bpf/progs/struct_ops_private_stack_fail.c | 6 ----
> .../progs/struct_ops_private_stack_recur.c | 6 ----
> 4 files changed, 13 insertions(+), 35 deletions(-)
>
> diff --git a/tools/testing/selftests/bpf/prog_tests/struct_ops_private_stack.c b/tools/testing/selftests/bpf/prog_tests/struct_ops_private_stack.c
> index d42123a0fb16..98db9bafa44b 100644
> --- a/tools/testing/selftests/bpf/prog_tests/struct_ops_private_stack.c
> +++ b/tools/testing/selftests/bpf/prog_tests/struct_ops_private_stack.c
> @@ -5,6 +5,7 @@
> #include "struct_ops_private_stack_fail.skel.h"
> #include "struct_ops_private_stack_recur.skel.h"
>
> +#if defined(__x86_64__) || defined(__aarch64__) || defined(__powerpc64__)
> static void test_private_stack(void)
> {
> struct struct_ops_private_stack *skel;
> @@ -15,11 +16,6 @@ static void test_private_stack(void)
> if (!ASSERT_OK_PTR(skel, "struct_ops_private_stack__open"))
> return;
>
> - if (skel->data->skip) {
> - test__skip();
> - goto cleanup;
> - }
> -
> err = struct_ops_private_stack__load(skel);
> if (!ASSERT_OK(err, "struct_ops_private_stack__load"))
> goto cleanup;
> @@ -48,15 +44,9 @@ static void test_private_stack_fail(void)
> if (!ASSERT_OK_PTR(skel, "struct_ops_private_stack_fail__open"))
> return;
>
> - if (skel->data->skip) {
> - test__skip();
> - goto cleanup;
> - }
> -
> err = struct_ops_private_stack_fail__load(skel);
> ASSERT_ERR(err, "struct_ops_private_stack_fail__load");
>
> -cleanup:
> struct_ops_private_stack_fail__destroy(skel);
> }
>
> @@ -70,11 +60,6 @@ static void test_private_stack_recur(void)
> if (!ASSERT_OK_PTR(skel, "struct_ops_private_stack_recur__open"))
> return;
>
> - if (skel->data->skip) {
> - test__skip();
> - goto cleanup;
> - }
> -
> err = struct_ops_private_stack_recur__load(skel);
> if (!ASSERT_OK(err, "struct_ops_private_stack_recur__load"))
> goto cleanup;
> @@ -93,7 +78,7 @@ static void test_private_stack_recur(void)
> struct_ops_private_stack_recur__destroy(skel);
> }
>
> -void test_struct_ops_private_stack(void)
> +static void __test_struct_ops_private_stack(void)
> {
> if (test__start_subtest("private_stack"))
> test_private_stack();
> @@ -102,3 +87,14 @@ void test_struct_ops_private_stack(void)
> if (test__start_subtest("private_stack_recur"))
> test_private_stack_recur();
> }
> +#else
> +static void __test_struct_ops_private_stack(void)
> +{
> + test__skip();
> +}
> +#endif
> +
> +void test_struct_ops_private_stack(void)
> +{
> + __test_struct_ops_private_stack();
> +}
> diff --git a/tools/testing/selftests/bpf/progs/struct_ops_private_stack.c b/tools/testing/selftests/bpf/progs/struct_ops_private_stack.c
> index dbe646013811..3cd0c1a55cbd 100644
> --- a/tools/testing/selftests/bpf/progs/struct_ops_private_stack.c
> +++ b/tools/testing/selftests/bpf/progs/struct_ops_private_stack.c
> @@ -7,12 +7,6 @@
>
> char _license[] SEC("license") = "GPL";
>
> -#if defined(__TARGET_ARCH_x86) || defined(__TARGET_ARCH_arm64)
> -bool skip __attribute((__section__(".data"))) = false;
> -#else
> -bool skip = true;
> -#endif
> -
> void bpf_testmod_ops3_call_test_2(void) __ksym;
>
> int val_i, val_j;
> diff --git a/tools/testing/selftests/bpf/progs/struct_ops_private_stack_fail.c b/tools/testing/selftests/bpf/progs/struct_ops_private_stack_fail.c
> index 3d89ad7cbe2a..1442728f5604 100644
> --- a/tools/testing/selftests/bpf/progs/struct_ops_private_stack_fail.c
> +++ b/tools/testing/selftests/bpf/progs/struct_ops_private_stack_fail.c
> @@ -7,12 +7,6 @@
>
> char _license[] SEC("license") = "GPL";
>
> -#if defined(__TARGET_ARCH_x86) || defined(__TARGET_ARCH_arm64)
> -bool skip __attribute((__section__(".data"))) = false;
> -#else
> -bool skip = true;
> -#endif
> -
> void bpf_testmod_ops3_call_test_2(void) __ksym;
>
> int val_i, val_j;
> diff --git a/tools/testing/selftests/bpf/progs/struct_ops_private_stack_recur.c b/tools/testing/selftests/bpf/progs/struct_ops_private_stack_recur.c
> index b1f6d7e5a8e5..faaa0f8d65a4 100644
> --- a/tools/testing/selftests/bpf/progs/struct_ops_private_stack_recur.c
> +++ b/tools/testing/selftests/bpf/progs/struct_ops_private_stack_recur.c
> @@ -7,12 +7,6 @@
>
> char _license[] SEC("license") = "GPL";
>
> -#if defined(__TARGET_ARCH_x86) || defined(__TARGET_ARCH_arm64)
> -bool skip __attribute((__section__(".data"))) = false;
> -#else
> -bool skip = true;
> -#endif
> -
> void bpf_testmod_ops3_call_test_1(void) __ksym;
>
> int val_i, val_j;
prev parent reply other threads:[~2026-03-31 5:12 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-31 8:03 [PATCH v6 1/2] powerpc64/bpf: Implement JIT support for private stack adubey
2026-03-31 5:07 ` Hari Bathini
2026-03-31 8:03 ` [PATCH v6 2/2] selftests/bpf: Enable private stack tests for powerpc64 adubey
2026-03-31 5:11 ` Hari Bathini [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7b1c95ac-1c65-43b4-bfd4-1bf4ce895853@linux.ibm.com \
--to=hbathini@linux.ibm.com \
--cc=adubey@linux.ibm.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=maddy@linux.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox