Skip to contentSkip to conversation

selftest/bpf: enable test for instruction array on arm64

PATCH Applied [email protected] 3 participants 3 messages Feb 23 – Feb 24

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 selftest/bpf: enable test for instruction array on arm64

From: Abhishek Dubey <[email protected]>

As arm64 JIT now supports instruction array, make sure all relevant tests run on this architecture.

#21/1    bpf_insn_array/one2one:OK
#21/2    bpf_insn_array/simple:OK
#21/3    bpf_insn_array/deletions:OK
#21/4    bpf_insn_array/deletions-with-functions:OK
#21/5    bpf_insn_array/blindness:OK
#21/6    bpf_insn_array/incorrect-index:OK
#21/7    bpf_insn_array/load-unfrozen-map:OK
#21/8    bpf_insn_array/no-map-reuse:OK
#21/9    bpf_insn_array/bpf-side-ops:OK
#21      bpf_insn_array:OK

Summary: 1/9 PASSED, 0 SKIPPED, 0 FAILED

---
 tools/testing/selftests/bpf/prog_tests/bpf_insn_array.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/testing/selftests/bpf/prog_tests/bpf_insn_array.c +1 -1
index 269870bec941..93166c2da8e7 100644
@@ -3,7 +3,7 @@
 #include <bpf/bpf.h>
 #include <test_progs.h>
 
-#ifdef __x86_64__
+#if defined(__x86_64__) || defined(__aarch64__)
 static int map_create(__u32 map_type, __u32 max_entries)
 {
 	const char *map_name = "insn_array";
Signature · 1 line
2.52.0
Acked-by on v1 1/1
#1 lore raw
Quoted 38 lines · On 26/02/23 03:35PM, [email protected] wrote:

From: Abhishek Dubey <[email protected]>

As arm64 JIT now supports instruction array, make sure all relevant tests run on this architecture.

#21/1    bpf_insn_array/one2one:OK
#21/2    bpf_insn_array/simple:OK
#21/3    bpf_insn_array/deletions:OK
#21/4    bpf_insn_array/deletions-with-functions:OK
#21/5    bpf_insn_array/blindness:OK
#21/6    bpf_insn_array/incorrect-index:OK
#21/7    bpf_insn_array/load-unfrozen-map:OK
#21/8    bpf_insn_array/no-map-reuse:OK
#21/9    bpf_insn_array/bpf-side-ops:OK
#21      bpf_insn_array:OK

Summary: 1/9 PASSED, 0 SKIPPED, 0 FAILED

---
 tools/testing/selftests/bpf/prog_tests/bpf_insn_array.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/testing/selftests/bpf/prog_tests/bpf_insn_array.c +1 -1
index 269870bec941..93166c2da8e7 100644
@@ -3,7 +3,7 @@
 #include <bpf/bpf.h>
 #include <test_progs.h>
 
-#ifdef __x86_64__
+#if defined(__x86_64__) || defined(__aarch64__)
 static int map_create(__u32 map_type, __u32 max_entries)
 {
 	const char *map_name = "insn_array";
Signature · 1 line
2.52.0
#2 lore raw
In reply to [email protected]
This patch was applied to bpf/bpf-next.git (master) by Alexei Starovoitov <[email protected]>:

Hello:

This patch was applied to bpf/bpf-next.git (master) by Alexei Starovoitov <[email protected]>:

Quoted 15 lines · On Mon, 23 Feb 2026 15:35:11 -0500 you wrote:

From: Abhishek Dubey <[email protected]>

As arm64 JIT now supports instruction array, make sure all relevant tests run on this architecture.

#21/1    bpf_insn_array/one2one:OK
#21/2    bpf_insn_array/simple:OK
#21/3    bpf_insn_array/deletions:OK
#21/4    bpf_insn_array/deletions-with-functions:OK
#21/5    bpf_insn_array/blindness:OK
#21/6    bpf_insn_array/incorrect-index:OK
#21/7    bpf_insn_array/load-unfrozen-map:OK
#21/8    bpf_insn_array/no-map-reuse:OK
#21/9    bpf_insn_array/bpf-side-ops:OK
#21      bpf_insn_array:OK
Quoted 3 lines

Summary: 1/9 PASSED, 0 SKIPPED, 0 FAILED

[...]

Here is the summary with links:
- selftest/bpf: enable test for instruction array on arm64

    https://git.kernel.org/bpf/bpf-next/c/99726ece0c8a

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html