selftests/bpf: Enable private stack tests for powerpc64

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>
Tested-by: Venkat Rao Bagalkote <venkat88@linux.ibm.com>
Reviewed-by: Hari Bathini <hbathini@linux.ibm.com>
Signed-off-by: Madhavan Srinivasan <maddy@linux.ibm.com>
Link: https://patch.msgid.link/20260401103215.104438-2-adubey@linux.ibm.com
This commit is contained in:
Abhishek Dubey 2026-04-01 06:32:15 -04:00 committed by Madhavan Srinivasan
parent 156d985123
commit e640bcd1bf
4 changed files with 13 additions and 35 deletions

View File

@ -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();
}

View File

@ -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;

View File

@ -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;

View File

@ -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;