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

Reply via email to