selftests/bpf: Add tests for rqspinlock
authorKumar Kartikeya Dwivedi <memxor@gmail.com>
Sun, 16 Mar 2025 04:05:41 +0000 (21:05 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Wed, 19 Mar 2025 15:03:06 +0000 (08:03 -0700)
commit60ba5b3ed7278a5700c8d57c3f5486b6066f745c
tree0e72d4e7d107eadefbb6c4f2d1763e1d3108e983
parentea21771c077c7aa85d46dd021d03eb0d96b5f418
selftests/bpf: Add tests for rqspinlock

Introduce selftests that trigger AA, ABBA deadlocks, and test the edge
case where the held locks table runs out of entries, since we then
fallback to the timeout as the final line of defense. Also exercise
verifier's AA detection where applicable.

Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Link: https://lore.kernel.org/r/20250316040541.108729-26-memxor@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/prog_tests/res_spin_lock.c [new file with mode: 0644]
tools/testing/selftests/bpf/progs/irq.c
tools/testing/selftests/bpf/progs/res_spin_lock.c [new file with mode: 0644]
tools/testing/selftests/bpf/progs/res_spin_lock_fail.c [new file with mode: 0644]