diff options
| author | Eduard Zingerman <[email protected]> | 2024-03-06 10:45:18 +0000 |
|---|---|---|
| committer | Andrii Nakryiko <[email protected]> | 2024-03-06 23:18:15 +0000 |
| commit | 5bab7a277ca8d4ef377a50a6678577b5bd7f74d8 (patch) | |
| tree | 1548d99624590adc3fb77a35942e00b65577a1c1 /tools/testing/selftests/bpf/bpf_testmod/bpf_testmod.c | |
| parent | libbpf: Honor autocreate flag for struct_ops maps (diff) | |
| download | kernel-5bab7a277ca8d4ef377a50a6678577b5bd7f74d8.tar.gz kernel-5bab7a277ca8d4ef377a50a6678577b5bd7f74d8.zip | |
selftests/bpf: Test struct_ops map definition with type suffix
Extend struct_ops_module test case to check if it is possible to use
'___' suffixes for struct_ops type specification.
Signed-off-by: Eduard Zingerman <[email protected]>
Signed-off-by: Andrii Nakryiko <[email protected]>
Acked-by: David Vernet <[email protected]>
Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'tools/testing/selftests/bpf/bpf_testmod/bpf_testmod.c')
| -rw-r--r-- | tools/testing/selftests/bpf/bpf_testmod/bpf_testmod.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/testing/selftests/bpf/bpf_testmod/bpf_testmod.c b/tools/testing/selftests/bpf/bpf_testmod/bpf_testmod.c index 098ddd067224..b9b488d6d53a 100644 --- a/tools/testing/selftests/bpf/bpf_testmod/bpf_testmod.c +++ b/tools/testing/selftests/bpf/bpf_testmod/bpf_testmod.c @@ -564,6 +564,8 @@ static int bpf_dummy_reg(void *kdata) { struct bpf_testmod_ops *ops = kdata; + if (ops->test_1) + ops->test_1(); /* Some test cases (ex. struct_ops_maybe_null) may not have test_2 * initialized, so we need to check for NULL. */ |
