diff options
author | Kees Cook <keescook@chromium.org> | 2019-05-20 15:37:49 -0700 |
---|---|---|
committer | Shuah Khan <skhan@linuxfoundation.org> | 2019-05-21 09:24:31 -0600 |
commit | fe48319243a626c860fd666ca032daacc2ba84a5 (patch) | |
tree | b5fd41f29077fd65df3ce9a7a6b3cbd62b3d4e96 /tools/testing/selftests/timers/threadtest.c | |
parent | e8108866cac5058ae5aff5fa601f91bda29128f2 (diff) |
selftests/timers: Add missing fflush(stdout) calls
When running under a pipe, some timer tests would not report output in
real-time because stdout flushes were missing after printf()s that lacked
a newline. This adds them to restore real-time status output that humans
can enjoy.
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Diffstat (limited to 'tools/testing/selftests/timers/threadtest.c')
-rw-r--r-- | tools/testing/selftests/timers/threadtest.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/testing/selftests/timers/threadtest.c b/tools/testing/selftests/timers/threadtest.c index 759c9c06f1a0..cf3e48919874 100644 --- a/tools/testing/selftests/timers/threadtest.c +++ b/tools/testing/selftests/timers/threadtest.c @@ -163,6 +163,7 @@ int main(int argc, char **argv) strftime(buf, 255, "%a, %d %b %Y %T %z", localtime(&start)); printf("%s\n", buf); printf("Testing consistency with %i threads for %ld seconds: ", thread_count, runtime); + fflush(stdout); /* spawn */ for (i = 0; i < thread_count; i++) |