diff options
| author | Dave Marchevsky <[email protected]> | 2023-04-15 20:18:11 +0000 |
|---|---|---|
| committer | Alexei Starovoitov <[email protected]> | 2023-04-16 00:36:50 +0000 |
| commit | 6147f15131e2df544a5449815f456da48c0c88e7 (patch) | |
| tree | 94d7c2b79cf60f0aecafab0fe209008a27957d44 /tools/testing/selftests/bpf/prog_tests/tracing_struct.c | |
| parent | bpf: Centralize btf_field-specific initialization logic (diff) | |
| download | kernel-6147f15131e2df544a5449815f456da48c0c88e7.tar.gz kernel-6147f15131e2df544a5449815f456da48c0c88e7.zip | |
selftests/bpf: Add refcounted_kptr tests
Test refcounted local kptr functionality added in previous patches in
the series.
Usecases which pass verification:
* Add refcounted local kptr to both tree and list. Then, read and -
possibly, depending on test variant - delete from tree, then list.
* Also test doing read-and-maybe-delete in opposite order
* Stash a refcounted local kptr in a map_value, then add it to a
rbtree. Read from both, possibly deleting after tree read.
* Add refcounted local kptr to both tree and list. Then, try reading and
deleting twice from one of the collections.
* bpf_refcount_acquire of just-added non-owning ref should work, as
should bpf_refcount_acquire of owning ref just out of bpf_obj_new
Usecases which fail verification:
* The simple successful bpf_refcount_acquire cases from above should
both fail to verify if the newly-acquired owning ref is not dropped
Signed-off-by: Dave Marchevsky <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Alexei Starovoitov <[email protected]>
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/tracing_struct.c')
0 files changed, 0 insertions, 0 deletions
