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/valid-adjtimex.c | |
parent | e8108866cac5058ae5aff5fa601f91bda29128f2 (diff) | |
download | linux-stable-fe48319243a626c860fd666ca032daacc2ba84a5.tar.gz linux-stable-fe48319243a626c860fd666ca032daacc2ba84a5.tar.bz2 linux-stable-fe48319243a626c860fd666ca032daacc2ba84a5.zip |
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/valid-adjtimex.c')
-rw-r--r-- | tools/testing/selftests/timers/valid-adjtimex.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/testing/selftests/timers/valid-adjtimex.c b/tools/testing/selftests/timers/valid-adjtimex.c index d9d3ab93b31a..5397de708d3c 100644 --- a/tools/testing/selftests/timers/valid-adjtimex.c +++ b/tools/testing/selftests/timers/valid-adjtimex.c @@ -123,6 +123,7 @@ int validate_freq(void) /* Set the leap second insert flag */ printf("Testing ADJ_FREQ... "); + fflush(stdout); for (i = 0; i < NUM_FREQ_VALID; i++) { tx.modes = ADJ_FREQUENCY; tx.freq = valid_freq[i]; @@ -250,6 +251,7 @@ int set_bad_offset(long sec, long usec, int use_nano) int validate_set_offset(void) { printf("Testing ADJ_SETOFFSET... "); + fflush(stdout); /* Test valid values */ if (set_offset(NSEC_PER_SEC - 1, 1)) |