Re: [PATCH bpf-next 2/2] selftests/bpf: Add BTF_KIND_FLOAT to btf_dump_test_case_syntax

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

 



On Fri, Mar 5, 2021 at 9:09 AM Ilya Leoshkevich <iii@xxxxxxxxxxxxx> wrote:
>
> Check that dumping various floating-point types produces a valid C
> code.
>
> Suggested-by: Andrii Nakryiko <andrii@xxxxxxxxxx>
> Signed-off-by: Ilya Leoshkevich <iii@xxxxxxxxxxxxx>
> ---
>  .../selftests/bpf/progs/btf_dump_test_case_syntax.c        | 7 +++++++
>  1 file changed, 7 insertions(+)
>
> diff --git a/tools/testing/selftests/bpf/progs/btf_dump_test_case_syntax.c b/tools/testing/selftests/bpf/progs/btf_dump_test_case_syntax.c
> index 31975c96e2c9..09d8d1e01ed6 100644
> --- a/tools/testing/selftests/bpf/progs/btf_dump_test_case_syntax.c
> +++ b/tools/testing/selftests/bpf/progs/btf_dump_test_case_syntax.c
> @@ -205,6 +205,12 @@ struct struct_with_embedded_stuff {
>         int t[11];
>  };
>
> +struct float_struct {
> +       float *f;

just for a bit more diversity, try this one without a pointer?

> +       const double *d;
> +       volatile long double *ld;
> +};
> +
>  struct root_struct {
>         enum e1 _1;
>         enum e2 _2;
> @@ -219,6 +225,7 @@ struct root_struct {
>         union_fwd_t *_12;
>         union_fwd_ptr_t _13;
>         struct struct_with_embedded_stuff _14;
> +       struct float_struct _15;
>  };
>
>  /* ------ END-EXPECTED-OUTPUT ------ */
> --
> 2.29.2
>



[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