Compatibility of the Zig build with the shell script¶
The Zig build (0.2.x) keeps the shell script’s (0.1.0) interface. The shell
script stays in the repository as the reference: tests/test_eb_keep_logs.sh
runs against either through TOOL_BIN, and tests/differential.sh runs both
on the same invocations.
Kept¶
commands |
|
exit codes |
0 on success and on every |
environment |
|
stdout |
|
files |
kept files closed to others (command streams mode 0600), their resolved paths appended to |
run ages |
days from the local midnight of the date in the run’s name, as |
Deliberate differences¶
case |
shell script |
Zig build |
|---|---|---|
no arguments, |
prints a trailing half sentence from the script’s header |
stops after the |
|
|
|
|
never returns |
refused, exit 2 |
|
evaluated as shell arithmetic |
refused, exit 2 |
a copy into LOGDIR fails |
error from cp, then the file is still listed and reported |
error on stderr; the file is neither listed nor reported |
a symbolic link or non-regular file at a destination name in LOGDIR |
cp writes through it |
refused, reported on stderr |
the failing command’s streams |
checked by path ( |
opened without following a symbolic link at the last component; the same checks run on the open file, and that file is copied |
|
rewritten by every compressed file, as a new file owned by the caller |
rewritten once per run when a line changes, keeping its owner (when permitted), mode and access ACL (access control list) entries, replaced atomically |
a run directory that cannot be removed |
counted as deleted |
reported on stderr, not counted |
compression |
runs |
in process; the gzip header (name, mtime, flags, OS) matches |
|
waits without a limit |
its process group is killed after 300 s, and nothing is kept |
a log larger than 1 GiB |
scanned |
copied, not scanned for the command output or meson paths, with a message on stderr |
a log with NUL bytes |
|
scanned as text |