selftests/bpf: fix clearing buffered output between tests/subtests
authorAndrii Nakryiko <andriin@fb.com>
Tue, 30 Jul 2019 18:05:41 +0000 (11:05 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Wed, 31 Jul 2019 04:12:38 +0000 (21:12 -0700)
commitbf8ff0f8cfd73e850c01b453ddb79609bd83279c
tree0b2d61faa4344726efafbbefe7040fbc44348efe
parent116e7dbe34b448775ba2c22b4cfe4ad9007131dd
selftests/bpf: fix clearing buffered output between tests/subtests

Clear buffered output once test or subtests finishes even if test was
successful. Not doing this leads to accumulation of output from previous
tests and on first failed tests lots of irrelevant output will be
dumped, greatly confusing things.

v1->v2: fix Fixes tag, add more context to patch

Fixes: 3a516a0a3a7b ("selftests/bpf: add sub-tests support for test_progs")
Signed-off-by: Andrii Nakryiko <andriin@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/test_progs.c