From: Jesper Dangaard Brouer <brouer@redhat.com>
To: Alexei Starovoitov <alexei.starovoitov@gmail.com>
Cc: Andrii Nakryiko <andrii.nakryiko@gmail.com>,
bpf <bpf@vger.kernel.org>, Hangbin Liu <haliu@redhat.com>,
Daniel Borkmann <borkmann@iogearbox.net>,
brouer@redhat.com
Subject: Re: [PATCH bpf-next] selftests/bpf: test_progs option for listing test names
Date: Wed, 1 Jul 2020 18:23:19 +0200 [thread overview]
Message-ID: <20200701182319.55a7c392@carbon> (raw)
In-Reply-To: <CAADnVQJmz461mcv4MBq40jtHBzeX0FgpFaQW3XLB0=U6Y3WgGw@mail.gmail.com>
On Wed, 1 Jul 2020 08:36:08 -0700
Alexei Starovoitov <alexei.starovoitov@gmail.com> wrote:
> On Tue, Jun 30, 2020 at 2:19 PM Andrii Nakryiko
> <andrii.nakryiko@gmail.com> wrote:
> >
> > On Tue, Jun 30, 2020 at 1:32 PM Jesper Dangaard Brouer
> > <brouer@redhat.com> wrote:
> > >
> > > On Tue, 30 Jun 2020 08:46:01 -0700
> > > Andrii Nakryiko <andrii.nakryiko@gmail.com> 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@fb.com>
>
> 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@iogearbox.net/
But I can see that it is not in the net-next git tree.
> 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.
--
Best regards,
Jesper Dangaard Brouer
MSc.CS, Principal Kernel Engineer at Red Hat
LinkedIn: http://www.linkedin.com/in/brouer
next prev parent reply other threads:[~2020-07-01 16:23 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-30 15:40 [PATCH bpf-next] selftests/bpf: test_progs option for listing test names Jesper Dangaard Brouer
2020-06-30 15:46 ` Andrii Nakryiko
2020-06-30 20:32 ` Jesper Dangaard Brouer
2020-06-30 21:19 ` Andrii Nakryiko
2020-07-01 15:36 ` Alexei Starovoitov
2020-07-01 16:23 ` Jesper Dangaard Brouer [this message]
2020-07-01 16:31 ` Alexei Starovoitov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200701182319.55a7c392@carbon \
--to=brouer@redhat.com \
--cc=alexei.starovoitov@gmail.com \
--cc=andrii.nakryiko@gmail.com \
--cc=borkmann@iogearbox.net \
--cc=bpf@vger.kernel.org \
--cc=haliu@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.