Re: [PATCH bpf-next v5 3/3] selftests/bpf: enable timed may_goto tests for riscv64

From: Björn Töpel

Date: Fri Jul 24 2026 - 15:51:43 EST


Pu Lehui <pulehui@xxxxxxxxxx> writes:

> On 2026/7/23 13:41, Feng Jiang wrote:
>> Enable verifier_may_goto_1 (raw instruction tests), stream_cond_break
>> (250ms timeout path), and the may_goto_interaction fastcall test on
>> riscv64 now that the JIT supports timed may_goto.
>>
>> Reviewed-by: Pu Lehui <pulehui@xxxxxxxxxx>
>> Signed-off-by: Feng Jiang <jiangfeng@xxxxxxxxxx>
>> ---
>> tools/testing/selftests/bpf/progs/stream.c | 1 +
>> tools/testing/selftests/bpf/progs/verifier_bpf_fastcall.c | 3 ++-
>> tools/testing/selftests/bpf/progs/verifier_may_goto_1.c | 4 ++++
>> 3 files changed, 7 insertions(+), 1 deletion(-)
>>
>> diff --git a/tools/testing/selftests/bpf/progs/stream.c b/tools/testing/selftests/bpf/progs/stream.c
>> index 92ba1d72e0ec..8d8e53d37266 100644
>> --- a/tools/testing/selftests/bpf/progs/stream.c
>> +++ b/tools/testing/selftests/bpf/progs/stream.c
>> @@ -64,6 +64,7 @@ SEC("syscall")
>> __arch_x86_64
>> __arch_arm64
>> __arch_s390x
>> +__arch_riscv64
>> __success __retval(0)
>> __stderr("ERROR: Timeout detected for may_goto instruction")
>
>
> This test fails because it relies on arch_bpf_stack_walk to fetch the
> prog. It's fine to leave it on though, since support is on the way.
>
> https://lore.kernel.org/bpf/20260722140015.1982158-1-varunrmallya@xxxxxxxxx/

I'm inclined to do the same here -- but only since it's RISC-V, where
the tests are not run by any automation yet. In general I *don't* like
that a series introduces a failing selftest merely because another
unmerged series is expected to fix it later.


Björn