diff options
author | Andrii Nakryiko <andriin@fb.com> | 2019-07-30 21:05:41 +0300 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2019-07-31 07:12:38 +0300 |
commit | bf8ff0f8cfd73e850c01b453ddb79609bd83279c (patch) | |
tree | 0b2d61faa4344726efafbbefe7040fbc44348efe /tools/testing/selftests/bpf/test_progs.c | |
parent | 116e7dbe34b448775ba2c22b4cfe4ad9007131dd (diff) | |
download | linux-bf8ff0f8cfd73e850c01b453ddb79609bd83279c.tar.xz |
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>
Diffstat (limited to 'tools/testing/selftests/bpf/test_progs.c')
-rw-r--r-- | tools/testing/selftests/bpf/test_progs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/testing/selftests/bpf/test_progs.c b/tools/testing/selftests/bpf/test_progs.c index 546d99b3ec34..db00196c8315 100644 --- a/tools/testing/selftests/bpf/test_progs.c +++ b/tools/testing/selftests/bpf/test_progs.c @@ -46,8 +46,8 @@ static void dump_test_log(const struct prog_test_def *test, bool failed) if (env.log_buf[env.log_cnt - 1] != '\n') fprintf(stdout, "\n"); } - env.log_cnt = 0; } + env.log_cnt = 0; } void test__end_subtest() |