Re: [PATCH bpf-next v1] selftests/bpf: Enable timed may_goto tests for LoongArch
Tiezhu Yang <[email protected]>
| Newsgroups | dev.linux.lists.loongarch,org.kernel.vger.bpf,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
On 2026/8/13 下午4:11, [email protected] wrote: >> selftests/bpf: Enable timed may_goto tests for LoongArch >> >> Enable stream_cond_break, may_goto_interaction, and verifier_may_goto_1 >> tests for LoongArch, aligning with recent architectural infrastructure >> support (timed may_goto and arch_bpf_stack_walk JIT). > > The changelog states the tests are enabled "aligning with recent > architectural infrastructure support (timed may_goto and arch_bpf_stack_walk > JIT)". Does LoongArch have this infrastructure at this commit? > > Looking at the tree, bpf_jit_supports_timed_may_goto() is not implemented for > LoongArch (only the __weak false stub in kernel/bpf/core.c:3379 exists). > arch/loongarch/net/Makefile builds only bpf_jit.o -- there is no > bpf_timed_may_goto.S file, unlike arm64, riscv, s390, powerpc, and x86. Also, > arch_bpf_stack_walk() is not implemented for LoongArch (only arch_stack_walk() > exists in arch/loongarch/kernel/stacktrace.c, but not the BPF-specific > variant). > > If the enabling JIT work is in a separate series or a different tree, should > the changelog name it and state the dependency? As applied, this patch makes > three previously-skipped subtests fail on LoongArch. Please see the additional comments after the --- marker line: "This patch is based on the latest bpf-next tree, it depends on the following two patches: LoongArch: BPF: Add timed may_goto support https://lore.kernel.org/loongarch/[email protected]/ LoongArch: BPF: Implement arch_bpf_stack_walk() https://lore.kernel.org/loongarch/[email protected]/ They are expected to be merged into v7.3-rc1 during the upcoming merge window through the loongarch-next tree." Here are the test results: Before: $ sudo ./test_progs -a stream_success/stream_cond_break #466/2 stream_success/stream_cond_break:SKIP #466 stream_success:OK (SKIP: 1/14) Summary: 1/0 PASSED, 1 SKIPPED, 0/0 FAILED $ sudo ./test_progs -a verifier_bpf_fastcall/may_goto_interaction #580/24 verifier_bpf_fastcall/may_goto_interaction:SKIP #580 verifier_bpf_fastcall:OK (SKIP: 1/29) Summary: 1/0 PASSED, 1 SKIPPED, 0/0 FAILED $ sudo ./test_progs -a verifier_may_goto_1 #635/1 verifier_may_goto_1/may_goto 0:SKIP #635/2 verifier_may_goto_1/batch 2 of may_goto 0:SKIP #635/3 verifier_may_goto_1/may_goto batch with offsets 2/1/0:SKIP #635/4 verifier_may_goto_1/may_goto batch with offsets 2/0:SKIP #635/5 verifier_may_goto_1/timed may_goto preserves R0-R5:SKIP #635 verifier_may_goto_1:SKIP Summary: 1/0 PASSED, 5 SKIPPED, 0/0 FAILED After: $ sudo ./test_progs -a stream_success/stream_cond_break #466/2 stream_success/stream_cond_break:OK #466 stream_success:OK Summary: 1/1 PASSED, 0 SKIPPED, 0/0 FAILED $ sudo ./test_progs -a verifier_bpf_fastcall/may_goto_interaction #580/24 verifier_bpf_fastcall/may_goto_interaction:OK #580 verifier_bpf_fastcall:OK Summary: 1/1 PASSED, 0 SKIPPED, 0/0 FAILED $ sudo ./test_progs -a verifier_may_goto_1 #635/1 verifier_may_goto_1/may_goto 0:OK #635/2 verifier_may_goto_1/batch 2 of may_goto 0:OK #635/3 verifier_may_goto_1/may_goto batch with offsets 2/1/0:OK #635/4 verifier_may_goto_1/may_goto batch with offsets 2/0:OK #635/5 verifier_may_goto_1/timed may_goto preserves R0-R5:OK #635 verifier_may_goto_1:OK Summary: 1/5 PASSED, 0 SKIPPED, 0/0 FAILED Thanks, Tiezhu