selftests/bpf: Add assert for user stacks in test_task_stack
authorJordan Rome <linux@jordanrome.com>
Sun, 12 Nov 2023 02:30:10 +0000 (18:30 -0800)
committerAndrii Nakryiko <andrii@kernel.org>
Tue, 14 Nov 2023 02:39:38 +0000 (18:39 -0800)
commit727a92d62fd6a382b4c5972008e45667e707b0e4
treebdf6000120c9329940c8ca3bca6fe8412bc340e9
parent100888fb6d8a185866b1520031ee7e3182b173de
selftests/bpf: Add assert for user stacks in test_task_stack

This is a follow up to:
commit b8e3a87a627b ("bpf: Add crosstask check to __bpf_get_stack").

This test ensures that the task iterator only gets a single
user stack (for the current task).

Signed-off-by: Jordan Rome <linux@jordanrome.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Acked-by: Stanislav Fomichev <sdf@google.com>
Link: https://lore.kernel.org/bpf/20231112023010.144675-1-linux@jordanrome.com
tools/testing/selftests/bpf/prog_tests/bpf_iter.c
tools/testing/selftests/bpf/progs/bpf_iter_task_stack.c