https://bugs.winehq.org/show_bug.cgi?id=49852
--- Comment #7 from Martin Storsjö martin@martin.st --- Thanks for the fixes and workarounds! The msvcrt fix lowers the runtime on aarch64 from 120 seconds to 55.
The workaround for piping to cat does work nicely as well, but one practical concern there is that it makes harder to check for the exit code of the wine process (unless using more elaborate constructs with bash and $PIPESTATUS).
In any case, it turned out to be trivial to strip out unnecessary printouts from the testcase, reducing the number of lines printed from 77k to around 2k, making it run in a sensible amount of time.
Thanks for your time and efforts!