test jobs.sh SH=/bin/sh: Improve racy test
commit 3085e8acd748dd tweaked this check to deal with Running
or Done, but needs to deal with the %- job being different
as well.
testport/bulk -t: Make stage-qa library dependencies check fatal.
This now forces PROXYDEPS_FATAL on for stage-qa when in test mode.
The PKG_NO_VERSION_FOR_DEPS feature depends on packages having proper
dependencies recorded. Pkg likely does too.
parallel_exec: Simplify; avoid a fork.
Like build_queue_runner() we can avoid needing to mess
with subshells or set -e by using an exit trap to write
back to the job pipe.
jobs_with_statuses: Avoid requiring a pipe to use this
This also avoids creating a giant multi-line string as the result
and instead returns 1 line at a time. This will allow an optimal
builtin.
tests expect_error_on_stderr: try to allow the child to error.
That is, before if the child threw an error we might never
see stderr. Now we should.
This requires disabling a few assertions that check for no job %1 which
now exists within here.
timestamp: Partially revert 728c011c
This change removed the `const` on prefix_stdout, prefix_stdin, and
time_start. This is not removed by the compiler, and does serve a
purpose beyond return values. Writes through the pointer, such as
`prefix_stdout[0] = 'a'` would cause a compiler error. The full
intention is that the variable is immutable once set.
`const char * const` could achieve that but is disallowed by the
compiler due to immutable pointer.
Issue #1103
sh: Fix a double free in a rare scenario with pipes
Taken from FreeBSD:
commit 75a6c38e4d5c651b7398bf2bea5baa41a0939e92
Author: Jilles Tjoelker <jilles at FreeBSD.org>
Date: Sat Nov 15 17:43:03 2025 +0100
bulk: Prevent EPIPE from children during cleanup.
It is possible that a signal comes in while in log_start()/log_stop() which
would leave inconsistent redirects that trap_pre_handler() cannot properly
cleanup.
shash: Deal with some globbing issues.
- Some functions were disabling globbing while all they wanted
was to *enable* globbing.
- Only glob the filename, not the path.
Some callers will set SHASH_VAR_PATH to a path that may contain spaces
or pattern characters that are not expected to be expanded.
- Ensure tests cover spaces.
- Protect some function calls from confusing arguments for options.