Re: [PATCH bpf-next] selftests/bpf: test_progs option for listing test names

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

 



On Wed, Jul 1, 2020 at 9:23 AM Jesper Dangaard Brouer <brouer@xxxxxxxxxx> wrote:
>
> On Wed, 1 Jul 2020 08:36:08 -0700
> Alexei Starovoitov <alexei.starovoitov@xxxxxxxxx> wrote:
>
> > On Tue, Jun 30, 2020 at 2:19 PM Andrii Nakryiko
> > <andrii.nakryiko@xxxxxxxxx> wrote:
> > >
> > > On Tue, Jun 30, 2020 at 1:32 PM Jesper Dangaard Brouer
> > > <brouer@xxxxxxxxxx> wrote:
> > > >
> > > > On Tue, 30 Jun 2020 08:46:01 -0700
> > > > Andrii Nakryiko <andrii.nakryiko@xxxxxxxxx> wrote:
> > > >
> > > > > > @@ -688,9 +700,17 @@ int main(int argc, char **argv)
> > > > > >                         cleanup_cgroup_environment();
> > > > > >         }
> > > > > >         stdio_restore();
> > > > > > +
> > > > > > +       if (env.list_test_names) {
> > > > > > +               if (env.succ_cnt == 0)
> > > > > > +                       env.fail_cnt = 1;
> > > > > > +               goto out;
> > > > > > +       }
> > > > > > +
> > > > >
> > > > > Why failure if no test matched? Is that to catch bugs in whitelisting?
> > > >
> > > > I would not call it catch bugs, but sort of.  The purpose is to know if
> > > > requested test is valid.  This can be used to e.g. run through all the
> > > > tests numbers, and stopping when a test number (-n) is no-longer valid,
> > > > by using this shell exit value as a test, like:
> > > >
> > > >  n=1;
> > > >  while [ $(./test_progs --list -n $n) ] ; do \
> > > >    echo "./test_progs -n $n" ; n=$(( n+1 )); \
> > > >  done
> > > >
> > > > Notice that this features that be used for looking up a test number,
> > > > and returning a testname, which was the original request from CI.  I
> > > > choose this implementation as it more generic and generally useful.
> > > >
> > > >  $ ./test_progs --list -n 89
> > > >  xdp_adjust_tail
> > > >
> > >
> > > Yeah, it has a nice querying effect. Makes sense.
> > >
> > > Acked-by: Andrii Nakryiko <andriin@xxxxxx>
> >
> > hmm. it doesn't apply.
> > Applying: selftests/bpf: Test_progs option for listing test names
> > error: sha1 information is lacking or useless
> > (tools/testing/selftests/bpf/test_progs.c).
> > error: could not build fake ancestor
> > Patch failed at 0001 selftests/bpf: Test_progs option for listing test names
>
> It doesn't apply because it depend on my previous changes, that Daniel
> said he applied:
>
>  https://lore.kernel.org/bpf/6e7543fa-f496-a6d2-a6d5-70dff9f84090@xxxxxxxxxxxxx/
>
> But I can see that it is not in the net-next git tree.

oops. sorry about this.
I guess to due taking out Jakub's set out of bpf-next and moving into bpf
some patches got lost. :(

> > Could you please respin.
>
> I will respin together with the other unapplied patch.  Which is
> actually fine, as I have an improvement for the previous patch, that I
> can squash.

Awesome. thanks



[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