[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190802201639.GC4544@mini-arch>
Date: Fri, 2 Aug 2019 13:16:39 -0700
From: Stanislav Fomichev <sdf@...ichev.me>
To: Andrii Nakryiko <andriin@...com>
Cc: Stanislav Fomichev <sdf@...gle.com>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"bpf@...r.kernel.org" <bpf@...r.kernel.org>,
"davem@...emloft.net" <davem@...emloft.net>,
"ast@...nel.org" <ast@...nel.org>,
"daniel@...earbox.net" <daniel@...earbox.net>,
"andrii.nakryiko@...il.com" <andrii.nakryiko@...il.com>
Subject: Re: [PATCH bpf-next 0/3] selftests/bpf: switch test_progs back to
stdio
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@...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(-)
> >
Powered by blists - more mailing lists