selftests/bpf: add another struct_ops callback use case test
authorAndrii Nakryiko <andrii@kernel.org>
Tue, 7 May 2024 00:13:31 +0000 (17:13 -0700)
committerMartin KaFai Lau <martin.lau@kernel.org>
Tue, 7 May 2024 23:21:59 +0000 (16:21 -0700)
commit9d66d60e968d85742569d025a2fb509cb57333bb
tree0056133a1840fba0679ecead0f07574264f7a33f
parente18e2e70dbd1ee3099049557060067b6ec703efa
selftests/bpf: add another struct_ops callback use case test

Add a test which tests the case that was just fixed. Kernel has full
type information about callback, but user explicitly nulls out the
reference to declaratively set BPF program reference.

Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/r/20240507001335.1445325-4-andrii@kernel.org
Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
tools/testing/selftests/bpf/prog_tests/test_struct_ops_module.c
tools/testing/selftests/bpf/progs/struct_ops_nulled_out_cb.c [new file with mode: 0644]