summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/bpf/progs/test_get_xattr.c
diff options
context:
space:
mode:
authorHou Tao <houtao1@huawei.com>2024-10-08 15:11:14 +0800
committerAlexei Starovoitov <ast@kernel.org>2024-10-09 16:32:47 -0700
commitc456f08040589a5096481277c83168a4e7ae7ed7 (patch)
tree9c608a91d62af4614fd05f8ac7ea1034e5385a35 /tools/testing/selftests/bpf/progs/test_get_xattr.c
parent797d73ee232dd1833dec4824bc53a22032e97c1c (diff)
selftests/bpf: Add more test case for field flattening
Add three success test cases to test the flattening of array of nested struct. For these three tests, the number of special fields in map is BTF_FIELDS_MAX, but the array is defined in structs with different nested level. Add one failure test case for the flattening as well. In the test case, the number of special fields in map is BTF_FIELDS_MAX + 1. It will make btf_parse_fields() in map_create() return -E2BIG, the creation of map will succeed, but the load of program will fail because the btf_record is invalid for the map. Signed-off-by: Hou Tao <houtao1@huawei.com> Acked-by: Eduard Zingerman <eddyz87@gmail.com> Link: https://lore.kernel.org/r/20241008071114.3718177-3-houtao@huaweicloud.com Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/testing/selftests/bpf/progs/test_get_xattr.c')
0 files changed, 0 insertions, 0 deletions