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/set-tz.c | |
parent | selftests: Remove forced unbuffering for test running (diff) | |
download | linux-dev-fe48319243a626c860fd666ca032daacc2ba84a5.tar.xz linux-dev-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/set-tz.c')
-rw-r--r-- | tools/testing/selftests/timers/set-tz.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/testing/selftests/timers/set-tz.c b/tools/testing/selftests/timers/set-tz.c index 877fd5532fee..62bd33eb16f0 100644 --- a/tools/testing/selftests/timers/set-tz.c +++ b/tools/testing/selftests/timers/set-tz.c @@ -65,6 +65,7 @@ int main(int argc, char **argv) printf("tz_minuteswest started at %i, dst at %i\n", min, dst); printf("Checking tz_minuteswest can be properly set: "); + fflush(stdout); for (i = -15*60; i < 15*60; i += 30) { ret = set_tz(i, dst); ret = get_tz_min(); @@ -76,6 +77,7 @@ int main(int argc, char **argv) printf("[OK]\n"); printf("Checking invalid tz_minuteswest values are caught: "); + fflush(stdout); if (!set_tz(-15*60-1, dst)) { printf("[FAILED] %i didn't return failure!\n", -15*60-1); |