Re: [PATCH bpf-next 05/11] selftests/bpf: add split BTF basic test

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

 



On Mon, Nov 2, 2020 at 3:36 PM Song Liu <songliubraving@xxxxxx> wrote:
>
>
>
> > On Oct 28, 2020, at 5:58 PM, Andrii Nakryiko <andrii@xxxxxxxxxx> wrote:
> >
> > Add selftest validating ability to programmatically generate and then dump
> > split BTF.
> >
> > Signed-off-by: Andrii Nakryiko <andrii@xxxxxxxxxx>
>
> Acked-by: Song Liu <songliubraving@xxxxxx>
>
> With a nit:
>
> [...]
> >
> > +
> > +static void btf_dump_printf(void *ctx, const char *fmt, va_list args)
> > +{
> > +     vfprintf(ctx, fmt, args);
> > +}
> > +
> > +void test_btf_split() {
> > +     struct btf_dump_opts opts;
> > +     struct btf_dump *d = NULL;
> > +     const struct btf_type *t;
> > +     struct btf *btf1, *btf2 = NULL;
>
> No need to initialize btf2 to NULL.

yep, must be a leftover from earlier version, I'll remove initialization.

>
> > +     int str_off, i, err;
> > +
> > +     btf1 = btf__new_empty();
> > +     if (!ASSERT_OK_PTR(btf1, "empty_main_btf"))
> > +             return;
> > +
> >
>
> [...]
>



[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