This a good idea. I would also suggest calling _set_abort_behavior and _set_error_mode, with CRTs which have them. Maybe we could have a static function in some internal header file which will be called from each test? ________________________________ From: Pali Rohár <[email protected]> Sent: Thursday, November 20, 2025 10:40 PM To: LIU Hao <[email protected]> Cc: [email protected] <[email protected]> Subject: Re: [Mingw-w64-public] [PATCH v2 7/7] crt: Extend t_time test for _localtime64 and _mktime64
On Thursday 20 November 2025 21:33:16 LIU Hao wrote: > 在 2025-11-20 21:29, Martin Storsjö 写道: > > These stdout printouts aren't visible in the logs on github actions, > > unless stdout is explicitly flushed before assert kills the process. > > > > Test programs should call `fprintf(stderr,` instead of `printf(`. I see. If the fd 1 and 2 are redirected to file then CRT lib does not auto-flush stdout and stderr buffers after \n. Maybe each test should call at the beginning: setvbuf(stdout, NULL, _IOLBF, 0); setvbuf(stderr, NULL, _IOLBF, 0); which switches stdout and stderr to line buffered output (like at the console output). _______________________________________________ Mingw-w64-public mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mingw-w64-public _______________________________________________ Mingw-w64-public mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
