From: Alexei Starovoitov Date: Thu, 6 Jul 2023 03:34:44 +0000 (-0700) Subject: selftests/bpf: Improve test coverage of bpf_mem_alloc. X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=f76faa65c9717304b5abb9d77a19b3c09d4086f3;p=linux.git selftests/bpf: Improve test coverage of bpf_mem_alloc. bpf_obj_new() calls bpf_mem_alloc(), but doing alloc/free of 8 elements is not triggering watermark conditions in bpf_mem_alloc. Increase to 200 elements to make sure alloc_bulk/free_bulk is exercised. Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann Acked-by: Hou Tao Link: https://lore.kernel.org/bpf/20230706033447.54696-12-alexei.starovoitov@gmail.com --- diff --git a/tools/testing/selftests/bpf/progs/linked_list.c b/tools/testing/selftests/bpf/progs/linked_list.c index 57440a554304d..84d1777a9e6c9 100644 --- a/tools/testing/selftests/bpf/progs/linked_list.c +++ b/tools/testing/selftests/bpf/progs/linked_list.c @@ -96,7 +96,7 @@ static __always_inline int list_push_pop_multiple(struct bpf_spin_lock *lock, struct bpf_list_head *head, bool leave_in_map) { struct bpf_list_node *n; - struct foo *f[8], *pf; + struct foo *f[200], *pf; int i; /* Loop following this check adds nodes 2-at-a-time in order to