From: adubey@linux.ibm.com
To: linuxppc-dev@lists.ozlabs.org
Cc: hbathini@linux.ibm.com, bpf@vger.kernel.org, maddy@linux.ibm.com,
ast@kernel.org, andrii@kernel.org, daniel@iogearbox.net,
shuah@kernel.org, linux-kselftest@vger.kernel.org,
Abhishek Dubey <adubey@linux.ibm.com>,
Venkat Rao Bagalkote <venkat88@linux.ibm.com>
Subject: [PATCH v7 2/2] selftests/bpf: Enable private stack tests for powerpc64
Date: Wed, 1 Apr 2026 06:32:15 -0400 [thread overview]
Message-ID: <20260401103215.104438-2-adubey@linux.ibm.com> (raw)
In-Reply-To: <20260401103215.104438-1-adubey@linux.ibm.com>
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
Signed-off-by: Abhishek Dubey <adubey@linux.ibm.com>
Reviewed-by: Hari Bathini <hbathini@linux.ibm.com>
Tested-by: Venkat Rao Bagalkote <venkat88@linux.ibm.com>
---
v6->v7:
Pickup tags
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
[v6]: https://lore.kernel.org/bpf/20260331080309.173612-1-adubey@linux.ibm.com
[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
.../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;
--
2.52.0
next prev parent reply other threads:[~2026-04-01 6:32 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-01 10:32 [PATCH v7 1/2] powerpc64/bpf: Implement JIT support for private stack adubey
2026-04-01 10:32 ` adubey [this message]
2026-04-08 4:28 ` Madhavan Srinivasan
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=20260401103215.104438-2-adubey@linux.ibm.com \
--to=adubey@linux.ibm.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=hbathini@linux.ibm.com \
--cc=linux-kselftest@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=maddy@linux.ibm.com \
--cc=shuah@kernel.org \
--cc=venkat88@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