selftests/bpf: Fix arena_spin_lock selftest failure
authorSaket Kumar Bhaskar <skb99@linux.ibm.com>
Sat, 13 Sep 2025 09:13:37 +0000 (14:43 +0530)
committerAlexei Starovoitov <ast@kernel.org>
Mon, 15 Sep 2025 17:49:18 +0000 (10:49 -0700)
commita9d4e9f0e871352a48a82da11a50df7196fe567a
tree7b2e6f7b7051e52c93d05405d45a66155244f0ba
parentf7528e4412138699d69946d2a811feb319268f6b
selftests/bpf: Fix arena_spin_lock selftest failure

For systems having CONFIG_NR_CPUS set to > 1024 in kernel config
the selftest fails as arena_spin_lock_irqsave() returns EOPNOTSUPP.
(eg - incase of powerpc default value for CONFIG_NR_CPUS is 8192)

The selftest is skipped incase bpf program returns EOPNOTSUPP,
with a descriptive message logged.

Tested-by: Venkat Rao Bagalkote <venkat88@linux.ibm.com>
Signed-off-by: Saket Kumar Bhaskar <skb99@linux.ibm.com>
Link: https://lore.kernel.org/r/20250913091337.1841916-1-skb99@linux.ibm.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/prog_tests/arena_spin_lock.c
tools/testing/selftests/bpf/progs/arena_spin_lock.c