OSDN Git Service

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)
commit0ef6740e97777bbe04aeacd32239ccb1732098d7
treebb6dfa8f502812fcf7a081aa26b0ae0b2603b287
parent04accf794bb2a5a06f23f7d48d195ffa329181a6
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