[PATCH bpf-next v1 1/3] selftests/bpf: Enable instruction array test for LoongArch
From: Tiezhu Yang
Date: Sun Nov 22 2026 - 23:51:49 EST
As the LoongArch JIT supports instruction array (gotox jump tables),
enable the corresponding BPF selftest for LoongArch.
With this patch:
$ sudo ./test_progs -t bpf_insn_array | tail -1
Summary: 1/20 PASSED, 0 SKIPPED, 0/0 FAILED
Signed-off-by: Tiezhu Yang <yangtiezhu@xxxxxxxxxxx>
---
tools/testing/selftests/bpf/prog_tests/bpf_insn_array.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/bpf/prog_tests/bpf_insn_array.c b/tools/testing/selftests/bpf/prog_tests/bpf_insn_array.c
index 4ffe4fe6b78e..6b1a426aa4cd 100644
--- a/tools/testing/selftests/bpf/prog_tests/bpf_insn_array.c
+++ b/tools/testing/selftests/bpf/prog_tests/bpf_insn_array.c
@@ -5,7 +5,7 @@
#include <test_progs.h>
#if defined(__x86_64__) || defined(__powerpc__) || defined(__aarch64__) || \
- (defined(__riscv) && __riscv_xlen == 64)
+ (defined(__riscv) && __riscv_xlen == 64) || defined(__loongarch__)
static int map_create(__u32 map_type, __u32 max_entries)
{
const char *map_name = "insn_array";
--
2.42.0