Commit Graph
3 Commits
Author SHA1 Message Date
Adrià d9d07db7e5 test(libc): serialise the writers of each stream in the ANYPS5_LOG_FILE concurrency test
A pipe write is atomic only up to PIPE_BUF, 512 bytes on macOS, so three threads writing 3 KB lines into one pipe interleaved before the copy read them.
2026-10-29 05:57:30 +01:00
MarcZX10 9b25533ecc refactor(libc): declare the log file flush and release beside the other shutdown hooks
The code that ends or replaces the process already includes Shutdown.hpp,
so LogFileFlush_nid_no_patch and LogFileRelease_nid_no_patch are declared
there instead of in LogFile.hpp, which only the log copy and its test
include.
2026-10-29 05:57:24 +01:00
MarcZX10 b2823fef71 test(libc): cover the ANYPS5_LOG_FILE log copy through real pipes and child processes
Run the copy in-process on real pipes and temp files: both streams reach
the terminal and the file in arrival order, a partial line of one stream
is not split by a line of the other, six concurrent writers of 3000-byte
lines never mix bytes inside a line, long lines and a line without a
newline are whole in the file at the end, the file is appended and a
relative path resolves against the working directory, an unopenable path
or a directory yields an error naming ANYPS5_LOG_FILE, the path and the
OS error, an unset or empty value reaches no factory and opens no
descriptor, and a closed, absent or full-disk side does not stop the
other. Child processes then check the terminal output, the file, the
startup failure and that enabling the log adds exactly two threads.
2026-10-29 05:57:24 +01:00