aboutsummaryrefslogtreecommitdiff
path: root/tools/testing/selftests/bpf/prog_tests/async_stack_depth.c
diff options
context:
space:
mode:
authorEduard Zingerman <eddyz87@gmail.com>2024-08-20 03:23:54 -0700
committerAlexei Starovoitov <ast@kernel.org>2024-08-21 11:03:01 -0700
commit7d743e4c759c6bff0131d638158c3472358eda2b (patch)
tree9d6b01047aed3777da2ff178fbd218d7ecf83a42 /tools/testing/selftests/bpf/prog_tests/async_stack_depth.c
parentb991fc52070042468f31b70fb8ccab96ba351f8a (diff)
selftests/bpf: __jited test tag to check disassembly after jit
Allow to verify jit behaviour by writing tests as below: SEC("tp") __arch_x86_64 __jited(" endbr64") __jited(" nopl (%rax,%rax)") __jited(" xorq %rax, %rax") ... __naked void some_test(void) { asm volatile (... ::: __clobber_all); } Allow regular expressions in patterns, same way as in __msg. By default assume that each __jited pattern has to be matched on the next consecutive line of the disassembly, e.g.: __jited(" endbr64") # matched on line N __jited(" nopl (%rax,%rax)") # matched on line N+1 If match occurs on a wrong line an error is reported. To override this behaviour use __jited("..."), e.g.: __jited(" endbr64") # matched on line N __jited("...") # not matched __jited(" nopl (%rax,%rax)") # matched on any line >= N Signed-off-by: Eduard Zingerman <eddyz87@gmail.com> Link: https://lore.kernel.org/r/20240820102357.3372779-7-eddyz87@gmail.com Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/async_stack_depth.c')
0 files changed, 0 insertions, 0 deletions