Re: [RESEND][PATCH bpf 2/2] selftests/bpf: Add more test case for field flattening

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On 9/12/2024 1:07 AM, Eduard Zingerman wrote:
> On Wed, 2024-09-11 at 19:05 +0800, Hou Tao wrote:
>
> [...]
>
>> diff --git a/tools/testing/selftests/bpf/progs/cpumask_failure.c b/tools/testing/selftests/bpf/progs/cpumask_failure.c
>> index a988d2823b52..e9cb93ce9533 100644
>> --- a/tools/testing/selftests/bpf/progs/cpumask_failure.c
>> +++ b/tools/testing/selftests/bpf/progs/cpumask_failure.c
>> @@ -10,6 +10,21 @@
>>  
>>  char _license[] SEC("license") = "GPL";
>>  
>> +struct kptr_nested_array_2 {
>> +	struct bpf_cpumask __kptr * mask;
>> +};
>> +
>> +struct kptr_nested_array_1 {
>> +	/* Make btf_parse_fields() in map_create() return -E2BIG */
>> +	struct kptr_nested_array_2 d_2[BTF_FIELDS_MAX + 1];
> Hi Huo,
>
> I think some headers are missing, I see the following error when
> compiling this test:
>
> progs/cpumask_failure.c:19:33: error: use of undeclared identifier 'BTF_FIELDS_MAX'; did you mean 'BTF_KIND_MAX'?
>    19 |         struct kptr_nested_array_2 d_2[BTF_FIELDS_MAX + 1];
>       |                                        ^~~~~~~~~~~~~~
>       |                                        BTF_KIND_MAX
>
> [...]

BTF_FIELDS_MAX should be defined in vmlinux.h. Could you please check
whether or not it is present ? It seems that BPF CI reports the same
problem for  build-x86_64-llvm-17/build-x86_64-llvm-18 [1], but others
build are OK.  Do you know  is there anything special about
build-x86_64-llvm-17/18 ?





[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux