Skip to content

Commit

Permalink
Explicitly disable buffering for stderr in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jonasnick committed Nov 25, 2019
1 parent fb424fb commit a0771d1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/tests.c
Original file line number Diff line number Diff line change
Expand Up @@ -5174,6 +5174,9 @@ int main(int argc, char **argv) {
* diagnostic information. Happens right at the start of main because
* setbuf must be used before any other operation on the stream. */
setbuf(stdout, NULL);
/* Also disable buffering for stderr because it's not guaranteed that it's
* unbuffered on all systems. */
setbuf(stderr, NULL);

/* find iteration count */
if (argc > 1) {
Expand Down

0 comments on commit a0771d1

Please sign in to comment.