]> git.baikalelectronics.ru Git - kernel.git/commit
selftests/bpf: Add tests for kptr_ref refcounting
authorKumar Kartikeya Dwivedi <memxor@gmail.com>
Wed, 11 May 2022 19:46:54 +0000 (01:16 +0530)
committerAlexei Starovoitov <ast@kernel.org>
Wed, 11 May 2022 23:57:27 +0000 (16:57 -0700)
commita4d2a3efb5848761ec5b93aaf83e577baca33925
treebb6dfa8f502812fcf7a081aa26b0ae0b2603b287
parent2f95ca7649b1b8550b837c6bf634fa3f5774db63
selftests/bpf: Add tests for kptr_ref refcounting

Check at runtime how various operations for kptr_ref affect its refcount
and verify against the actual count.

Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Link: https://lore.kernel.org/r/20220511194654.765705-5-memxor@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/prog_tests/map_kptr.c
tools/testing/selftests/bpf/progs/map_kptr.c