diff options
| author | Vadim Fedorenko <[email protected]> | 2024-06-13 21:18:17 +0000 |
|---|---|---|
| committer | Alexei Starovoitov <[email protected]> | 2024-06-13 23:33:04 +0000 |
| commit | 2d45ab1eda469c802728d0a74e1601de5e71c098 (patch) | |
| tree | 57df14787c55b7ddfbf0b609138da6a0459cc3e2 /tools/testing/selftests/bpf/prog_tests/kfunc_param_nullable.c | |
| parent | selftests: bpf: crypto: adjust bench to use nullable IV (diff) | |
| download | kernel-2d45ab1eda469c802728d0a74e1601de5e71c098.tar.gz kernel-2d45ab1eda469c802728d0a74e1601de5e71c098.zip | |
selftests: bpf: add testmod kfunc for nullable params
Add special test to be sure that only __nullable BTF params can be
replaced by NULL. This patch adds fake kfuncs in bpf_testmod to
properly test different params.
Acked-by: Eduard Zingerman <[email protected]>
Signed-off-by: Vadim Fedorenko <[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/kfunc_param_nullable.c')
| -rw-r--r-- | tools/testing/selftests/bpf/prog_tests/kfunc_param_nullable.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tools/testing/selftests/bpf/prog_tests/kfunc_param_nullable.c b/tools/testing/selftests/bpf/prog_tests/kfunc_param_nullable.c new file mode 100644 index 000000000000..c8f4dcaac7c7 --- /dev/null +++ b/tools/testing/selftests/bpf/prog_tests/kfunc_param_nullable.c @@ -0,0 +1,11 @@ +// SPDX-License-Identifier: GPL-2.0 + +/* Copyright (c) 2024 Meta Platforms, Inc */ + +#include <test_progs.h> +#include "test_kfunc_param_nullable.skel.h" + +void test_kfunc_param_nullable(void) +{ + RUN_TESTS(test_kfunc_param_nullable); +} |
