selftests/bpf: Add stacktrace map lookup_and_delete_elem test case
authorTao Chen <chen.dylane@linux.dev>
Thu, 25 Sep 2025 17:50:30 +0000 (01:50 +0800)
committerAndrii Nakryiko <andrii@kernel.org>
Thu, 25 Sep 2025 23:17:30 +0000 (16:17 -0700)
commitd43029ff7d1b7183dc0cf11b6cc2c12a0b810ad8
tree8043d16eb0eb3c1c194b09b2d40183b397bb75f8
parent363b17e273f0929ba7791231a0bbb5424204d93a
selftests/bpf: Add stacktrace map lookup_and_delete_elem test case

Add tests for stacktrace map lookup and delete:
1. use bpf_map_lookup_and_delete_elem to lookup and delete the target
   stack_id,
2. lookup the deleted stack_id again to double check.

Signed-off-by: Tao Chen <chen.dylane@linux.dev>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20250925175030.1615837-3-chen.dylane@linux.dev
tools/testing/selftests/bpf/prog_tests/stacktrace_map.c
tools/testing/selftests/bpf/progs/stacktrace_map.c