netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stanislav Fomichev <sdf@fomichev.me>
To: Andrii Nakryiko <andriin@fb.com>
Cc: Stanislav Fomichev <sdf@google.com>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"bpf@vger.kernel.org" <bpf@vger.kernel.org>,
	"davem@davemloft.net" <davem@davemloft.net>,
	"ast@kernel.org" <ast@kernel.org>,
	"daniel@iogearbox.net" <daniel@iogearbox.net>,
	"andrii.nakryiko@gmail.com" <andrii.nakryiko@gmail.com>
Subject: Re: [PATCH bpf-next 0/3] selftests/bpf: switch test_progs back to stdio
Date: Fri, 2 Aug 2019 13:16:39 -0700	[thread overview]
Message-ID: <20190802201639.GC4544@mini-arch> (raw)
In-Reply-To: <c79d3a8c-4986-a321-7b68-5273be7c2be7@fb.com>

On 08/02, Andrii Nakryiko wrote:
> 
> On 8/2/19 10:17 AM, Stanislav Fomichev wrote:
> > I was looking into converting test_sockops* to test_progs framework
> > and that requires using cgroup_helpers.c which rely on stdio/stderr.
> > Let's use open_memstream to override stdout into buffer during
> > subtests instead of custom test_{v,}printf wrappers. That lets
> > us continue to use stdio in the subtests and dump it on failure
> > if required.
> >
> > That would also fix bpf_find_map which currently uses printf to
> > signal failure (missed during test_printf conversion).
> I wonder if we should hijack stderr as well?
I was planning to do it when I add cgroup_helpers support because they
log to stderr. Wanted to keep the changes minimal. But let's do
them all in this series while we are it.

> > Cc: Andrii Nakryiko <andriin@fb.com>
> >
> > Stanislav Fomichev (3):
> >   selftests/bpf: test_progs: switch to open_memstream
> >   selftests/bpf: test_progs: test__printf -> printf
> >   selftests/bpf: test_progs: drop extra trailing tab
> >
> >  .../bpf/prog_tests/bpf_verif_scale.c          |   4 +-
> >  .../selftests/bpf/prog_tests/l4lb_all.c       |   2 +-
> >  .../selftests/bpf/prog_tests/map_lock.c       |  10 +-
> >  .../selftests/bpf/prog_tests/send_signal.c    |   4 +-
> >  .../selftests/bpf/prog_tests/spinlock.c       |   2 +-
> >  .../bpf/prog_tests/stacktrace_build_id.c      |   4 +-
> >  .../bpf/prog_tests/stacktrace_build_id_nmi.c  |   4 +-
> >  .../selftests/bpf/prog_tests/xdp_noinline.c   |   4 +-
> >  tools/testing/selftests/bpf/test_progs.c      | 116 +++++++-----------
> >  tools/testing/selftests/bpf/test_progs.h      |  12 +-
> >  10 files changed, 68 insertions(+), 94 deletions(-)
> >

      reply	other threads:[~2019-08-02 20:16 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-02 17:17 [PATCH bpf-next 0/3] selftests/bpf: switch test_progs back to stdio Stanislav Fomichev
2019-08-02 17:17 ` [PATCH bpf-next 1/3] selftests/bpf: test_progs: switch to open_memstream Stanislav Fomichev
2019-08-02 19:57   ` Andrii Nakryiko
2019-08-02 20:14     ` Stanislav Fomichev
2019-08-03  6:00       ` Andrii Nakryiko
2019-08-05 15:12         ` Stanislav Fomichev
2019-08-02 17:17 ` [PATCH bpf-next 2/3] selftests/bpf: test_progs: test__printf -> printf Stanislav Fomichev
2019-08-02 19:59   ` Andrii Nakryiko
2019-08-02 17:17 ` [PATCH bpf-next 3/3] selftests/bpf: test_progs: drop extra trailing tab Stanislav Fomichev
2019-08-02 19:59   ` Andrii Nakryiko
2019-08-02 20:00 ` [PATCH bpf-next 0/3] selftests/bpf: switch test_progs back to stdio Andrii Nakryiko
2019-08-02 20:16   ` Stanislav Fomichev [this message]

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=20190802201639.GC4544@mini-arch \
    --to=sdf@fomichev.me \
    --cc=andrii.nakryiko@gmail.com \
    --cc=andriin@fb.com \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=sdf@google.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).