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]

 



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

[...]






[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