From a0771d15e67d3fe6ac1791f81d9731f73c550e5e Mon Sep 17 00:00:00 2001 From: Jonas Nick Date: Mon, 25 Nov 2019 10:17:02 +0000 Subject: [PATCH] Explicitly disable buffering for stderr in tests --- src/tests.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/tests.c b/src/tests.c index 35fc8adb72700..d1cfcb5d03ed5 100644 --- a/src/tests.c +++ b/src/tests.c @@ -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) {