diff options
author | Eduard Zingerman <eddyz87@gmail.com> | 2024-03-06 12:45:18 +0200 |
---|---|---|
committer | Andrii Nakryiko <andrii@kernel.org> | 2024-03-06 15:18:15 -0800 |
commit | 5bab7a277ca8d4ef377a50a6678577b5bd7f74d8 (patch) | |
tree | 1548d99624590adc3fb77a35942e00b65577a1c1 /tools/testing/selftests/bpf/bpf_testmod/bpf_testmod.c | |
parent | 8db052615a9780b45e26d6afabc7abefe1ba20ac (diff) | |
download | linux-5bab7a277ca8d4ef377a50a6678577b5bd7f74d8.tar.gz linux-5bab7a277ca8d4ef377a50a6678577b5bd7f74d8.tar.bz2 linux-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 <eddyz87@gmail.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Acked-by: David Vernet <void@manifault.com>
Link: https://lore.kernel.org/bpf/20240306104529.6453-5-eddyz87@gmail.com
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. */ |