diff --git a/tests/common/test_common_main.c b/tests/common/test_common_main.c index 37adaa3f..4ad60f34 100644 --- a/tests/common/test_common_main.c +++ b/tests/common/test_common_main.c @@ -3,6 +3,7 @@ #include "config_ac.h" #endif +#include #include #include "log.h" @@ -58,6 +59,9 @@ int main (void) struct log_config *lc = log_config_init_for_console(LOG_LEVEL_INFO, NULL); log_start_from_param(lc); log_config_free(lc); + /* Disable stdout buffering, as this can confuse the error + * reporting when running in libcheck fork mode */ + setvbuf(stdout, NULL, _IONBF, 0); /* Initialise the ssl module */ ssl_init(); diff --git a/tests/libipm/test_libipm_main.c b/tests/libipm/test_libipm_main.c index 22f89508..b0933fae 100644 --- a/tests/libipm/test_libipm_main.c +++ b/tests/libipm/test_libipm_main.c @@ -3,6 +3,7 @@ #include "config_ac.h" #endif +#include #include #include "log.h" @@ -177,6 +178,9 @@ int main (void) struct log_config *lc = log_config_init_for_console(LOG_LEVEL_INFO, NULL); log_start_from_param(lc); log_config_free(lc); + /* Disable stdout buffering, as this can confuse the error + * reporting when running in libcheck fork mode */ + setvbuf(stdout, NULL, _IONBF, 0); /* Initialise modules */ suite_test_libipm_calls_start(); diff --git a/tests/libxrdp/test_libxrdp_main.c b/tests/libxrdp/test_libxrdp_main.c index a2af4854..adfaca92 100644 --- a/tests/libxrdp/test_libxrdp_main.c +++ b/tests/libxrdp/test_libxrdp_main.c @@ -2,6 +2,7 @@ #include "config_ac.h" #endif +#include #include #include #include "log.h" @@ -22,6 +23,9 @@ int main (void) struct log_config *lc = log_config_init_for_console(LOG_LEVEL_INFO, NULL); log_start_from_param(lc); log_config_free(lc); + /* Disable stdout buffering, as this can confuse the error + * reporting when running in libcheck fork mode */ + setvbuf(stdout, NULL, _IONBF, 0); srunner_run_all (sr, CK_ENV); number_failed = srunner_ntests_failed(sr); diff --git a/tests/memtest/memtest.c b/tests/memtest/memtest.c index 71268b13..561f75d0 100644 --- a/tests/memtest/memtest.c +++ b/tests/memtest/memtest.c @@ -26,6 +26,9 @@ int main(int argc, char **argv) config = log_config_init_for_console(LOG_LEVEL_DEBUG, NULL); log_start_from_param(config); log_config_free(config); + /* Disable stdout buffering, as this can confuse the error + * reporting when running in libcheck fork mode */ + setvbuf(stdout, NULL, _IONBF, 0); srand(time(0)); obj = libmem_init(0x80000000, 64 * 1024 * 1024); diff --git a/tests/xrdp/test_xrdp_main.c b/tests/xrdp/test_xrdp_main.c index 947c59b6..b0aaa12f 100644 --- a/tests/xrdp/test_xrdp_main.c +++ b/tests/xrdp/test_xrdp_main.c @@ -33,6 +33,7 @@ #include "log.h" #include "os_calls.h" +#include #include #include "test_xrdp.h" @@ -49,6 +50,9 @@ int main (void) g_getenv("TEST_LOG_LEVEL")); log_start_from_param(logging); log_config_free(logging); + /* Disable stdout buffering, as this can confuse the error + * reporting when running in libcheck fork mode */ + setvbuf(stdout, NULL, _IONBF, 0); sr = srunner_create (make_suite_test_bitmap_load()); srunner_add_suite(sr, make_suite_egfx_base_functions());