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) {