selftests/bpf: verifier/loops1 converted to inline assembly
authorEduard Zingerman <eddyz87@gmail.com>
Fri, 21 Apr 2023 17:42:19 +0000 (20:42 +0300)
committerAlexei Starovoitov <ast@kernel.org>
Fri, 21 Apr 2023 19:19:07 +0000 (12:19 -0700)
commita6fc14dc5e8d43871eebe5455719de6d7578a3bc
tree80532bd53dd7b97e81ffc8605b5db9b0ed3060e7
parenta5828e3154d17d9fec53910a1aa161d028339ada
selftests/bpf: verifier/loops1 converted to inline assembly

Test verifier/loops1 automatically converted to use inline assembly.

There are a few modifications for the converted tests.
"tracepoint" programs do not support test execution, change program
type to "xdp" (which supports test execution) for the following tests
that have __retval tags:
- bounded loop, count to 4
- bonded loop containing forward jump

Also, remove the __retval tag for test:
- bounded loop, count from positive unknown to 4

As it's return value is a random number.

Signed-off-by: Eduard Zingerman <eddyz87@gmail.com>
Link: https://lore.kernel.org/r/20230421174234.2391278-10-eddyz87@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/prog_tests/verifier.c
tools/testing/selftests/bpf/progs/verifier_loops1.c [new file with mode: 0644]
tools/testing/selftests/bpf/verifier/loops1.c [deleted file]