diff options
author | Kui-Feng Lee <thinker.li@gmail.com> | 2024-05-23 10:42:00 -0700 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2024-06-03 20:52:42 -0700 |
commit | c4c6c3b785a0b1426add15d078da61f899abeaac (patch) | |
tree | bdf978cfc78a73d41542df82a794c3b069184d61 /tools/testing/selftests/bpf/prog_tests | |
parent | f19caf57d80f4432acea61d858d45ce194444389 (diff) |
selftests/bpf: Test kptr arrays and kptrs in nested struct fields.
Make sure that BPF programs can declare global kptr arrays and kptr fields
in struct types that is the type of a global variable or the type of a
nested descendant field in a global variable.
An array with only one element is special case, that it treats the element
like a non-array kptr field. Nested arrays are also tested to ensure they
are handled properly.
Acked-by: Eduard Zingerman <eddyz87@gmail.com>
Signed-off-by: Kui-Feng Lee <thinker.li@gmail.com>
Link: https://lore.kernel.org/r/20240523174202.461236-8-thinker.li@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests')
-rw-r--r-- | tools/testing/selftests/bpf/prog_tests/cpumask.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/testing/selftests/bpf/prog_tests/cpumask.c b/tools/testing/selftests/bpf/prog_tests/cpumask.c index ecf89df78109..2570bd4b0cb2 100644 --- a/tools/testing/selftests/bpf/prog_tests/cpumask.c +++ b/tools/testing/selftests/bpf/prog_tests/cpumask.c @@ -18,6 +18,11 @@ static const char * const cpumask_success_testcases[] = { "test_insert_leave", "test_insert_remove_release", "test_global_mask_rcu", + "test_global_mask_array_one_rcu", + "test_global_mask_array_rcu", + "test_global_mask_array_l2_rcu", + "test_global_mask_nested_rcu", + "test_global_mask_nested_deep_rcu", "test_cpumask_weight", }; |