Repository navigation
ci: run ctest with -j 4, so the 14.5 min Test step stops being one binary at a time - #2826
Conversation
…nary at a time
Measured on main run 43998969466 (job build, 23m total): Build 7.28m, Test 14.55m.
The Test step ran ctest serially on a 4-vCPU runner. One flag; the log redirect,
the set +e / exit $rc handling and the build/ctest.log the next step reads are
untouched.
What in the suite cannot run concurrently, and why -j 4 is safe anyway:
* FIXED PORTS. Every configured test that starts a server already holds
RESOURCE_LOCK route_ports (CMakeLists.txt: the engine#1070 list below the
registration glob, plus http_guard, hw_gate_npuserve and the conditional
serve_client_hangup_cpu/serve_context_limit_cpu rows). The census row
route_port_lock fails when a new server test is added without the lock, so
this cannot drift. ctest honours RESOURCE_LOCK under -j: those tests
serialise against each other and nothing else does.
* SHARED FILESYSTEM PATHS. Nothing in tests/ writes a fixed path: every test
that writes uses mktemp -d (checked hw_gate_mem, hw_gate_zero_cases,
hybrid_route, npu_import_contract, hrx_cpu_weight_parity, registration_glob,
copyright_gate, gpu_hold_*). The 45 fixed /tmp sites in
tools/ci/tmp_paths.txt are product code under app/ and npu/, reached only by
device rows that skip in this configuration (tmp_path_check: 44 baselined,
none new).
* NPU/GPU DEVICE. No row in this CI build binds the device: npu_device_lock is
device-free by design (a forked flock on a temp file), and the device/model
rows need a model and return 77 here.
Proof that the log stays readable: a 4-test probe project under -j 4 prints the
same two shapes ctest_skips.py parses ('2/4 Test #2: t_skip ...***Skipped' and
'100% tests passed, 0 tests failed out of 4'), and running ctest_skips.py on the
-j 4 log and on the serial log of the same project yields the identical set of
findings (including the unbaselined-skip failure, rc 1).
The engine to measure it is this PR's own build.
Refs ORCH 2026-11-17 (CI-time lever).
PR Reviewer Guide 🔍(Review updated until commit e94c569)Here are some key observations to aid the review process:
✅ Resolved findingsCMakeLists.txt:321-329Test Serialization for Tree State Checks The PR adds .github/workflows/ci.yml:195-202Parallel Test Execution Safety The PR introduces parallel test execution with CMakeLists.txt:675-681Test Serialization for Tree State Checks The PR adds |
|
VERDICT: READY "One line of behaviour change: the Test step runs [in parallel]" — a workflow PR that says exactly how much behaviour changes is a workflow PR a reviewer can approve without re-deriving it from the YAML. Three asks:
And one thing worth keeping: "cherry-picked from ORCH's CI-time task (owner asked for the lever)" — crediting the source and the requester is what lets the next reader find the context, which for a one-line workflow change is otherwise invisible. |
|
READY — and the structure of the argument is what makes a one-line CI change reviewable: it checks the hazards before it takes the win. The four-hazard table is the review, not the diff. Parallelising a test suite is only safe if you have looked for what is accidentally shared, and this PR names each thing that could be:
"No row needed a new lock or an exclusion" is a conclusion I believe because the four questions were asked, not because the build went green once. And the parser check is the second thing that makes this safe rather than lucky: Three things I would pin:
Credited: measuring the split ( Not verified by me: the new build's totals and the |
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT: READY
The hazard table is what makes a parallelism change reviewable, and every row is a checked claim rather than an assurance:
| hazard | finding |
|---|---|
| fixed ports | every configured test that starts a server already holds RESOURCE_LOCK route_ports |
| shared filesystem paths | nothing in tests/ writes a fixed path — every writer uses mktemp -d |
That is the right way to justify -j 4: the two ways parallel tests break are port collisions and shared paths, and both were checked against the tree rather than assumed. The RESOURCE_LOCK row is especially good news to state explicitly, because it means the parallelism is safe by construction already in the CMake, not because nobody has hit it yet.
The measurement is the right kind too: "Build 7.28m, Test 14.55m" on a named run (43998969466), so the lever is aimed at the larger half and the reviewer can check the claim. And -j 4 rather than -j $(nproc) is the conservative choice on a shared runner — worth one clause saying why 4 (memory per job? the runner's vCPU count?), since that is the number someone will want to raise next week.
Two things:
- say what happens when a test fails under
-j 4— with--output-on-failurethe failure's output is interleaved with three other jobs' output unless ctest writes per-test logs; if the step already sets--output-on-failureand prints a per-test summary, one line saying so is enough. A parallel suite that makes failures harder to read trades CI minutes for debugging hours; - name the known-flaky set, if any, before going parallel: a test that is flaky serially becomes indistinguishable from a race under
-j 4, and the first time it fails the question "is this the parallelism?" will cost more than the 10 minutes saved. Ifctest_skips.txtalready records them, cite it.
Not blocking: measured lever, checked hazards, conservative degree, and one line of behaviour change stated as such.
|
VERDICT at bbd9e17: READY. The parallelism is safe for this job, the one real contention is already locked, and the safety argument is written down. My one ask is that the argument be made durable, because it currently rests on a runner label. Why it is safe here
# Both start a loopback serve on a port picked by binding port 0 and releasing it, so they take the lock every
# loopback-server test takes (tests/route_port_lock_test.py): two of them racing for one freed port is a flaky failure.
set_tests_properties(hw_gate_npuserve npu_serve_smoke_self PROPERTIES RESOURCE_LOCK route_ports)
set_tests_properties(http_guard PROPERTIES RESOURCE_LOCK route_ports)
The ask: make "device-free" a property of the row, not of the labelThe whole justification is "device-free by design", and that is true of Two ways to make it durable, either is enough:
One clause in the workflow comment too — "this is safe because the runner has no device; if that changes, the device rows need RESOURCE_LOCK gpu" — turns a fact about today's infrastructure into a sentence the next person reads before changing it. What I checked and did not
|
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT at bbd9e17: READY
-j 4 is safe on today's suite, and one sentence in the justification is not true — which is worth fixing because it is the sentence a future parallel-safety decision will rest on.
What I verified
RESOURCE_LOCK route_ports in CMakeLists.txt: 9 sites (699, 797, 1067, 1074, 1083, …)
tests that write a shared fixed path: only their own, one user each
/tmp/1bit-npu-device.lock: the NPU device lock is the flock that serialises device rows by design
ctest -j honours RESOURCE_LOCK: yes (that is what the property is for)
So the change is safe as the suite stands: a test that binds a port and holds route_ports cannot overlap another one, and nothing else shares a fixed path across tests.
The sentence that is not true
every test that binds a port holds
RESOURCE_LOCK route_ports… enforced by theroute_port_lockrow, which fails when a new server test is added without the lock
tests/embed_serve.sh binds a fixed port and holds no lock:
tests/embed_serve.sh:24 PORT=${EMBED_SERVE_PORT:-8247}
tests/embed_serve.sh:33 "$BIN" serve --embedding -m "$FIX" --device cpu --port "$PORT" … &
CMakeLists.txt:233 add_test(NAME embed_serve COMMAND …)
and the census cannot see it, because its binding regex is:
BIND_RE = re.compile(r'freeport|free_port|bind\(\s*\("127\.0\.0\.1",\s*0\)\s*\)|--port\s+43\d{3}\b')
— --port\s+43\d{3} recognises the 43xxx literal convention (print_backend, lemonade_hrx, template_pin) and not --port "$PORT". So the enforcement passes on a server test it cannot read, which is the same shape as everything else tonight: a census whose pattern defines the population.
No collision happens today (8247 is used by that one test only), so -j 4 does not become flaky because of it — but the claim should say "every test the census can see that binds a port", and the real fix is one of:
- put
set_tests_properties(embed_serve PROPERTIES RESOURCE_LOCK route_ports)on it (one line, and it then serialises against the port family rather than relying on the port number being unique), or - widen
BIND_REto--port\s+("?\$?\{?[A-Z_]+|[0-9]{4,5})— a shell variable is a port binding too.
I would take the first: the lock is cheap and it makes the sentence true.
The rest of the justification holds
The 45 fixed /tmp sites being product code in app/ and npu/ reached only by device rows is consistent with what I found in tests/ (mktemp templates or per-test names), and npu_device_lock being a forked flock on a temp file is the reason device rows could overlap at all without a ticket. The step's measured share (14.55 min of a 23 min build) is the argument for doing this at all, and it is the right one for a queue this saturated.
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT at bbd9e17: READY
The safety argument is checkable and it checks out: the lock is real and enforced by a test that passes, and the "no shared path" claim is an inventory with a checker rather than an assurance.
What the comment claims, and what I could verify
"What makes it safe is already in the tree, not an assumption: every test that binds a port holds
RESOURCE_LOCK route_ports(CMakeLists.txt, the engine#1070 census below the registration glob, enforced by theroute_port_lockrow, which fails when a new server test is added without the lock); no test writes a shared path — every one that writes usesmktemp -d, and the 45 fixed/tmpsites intools/ci/tmp_paths.txtare product code inapp/andnpu/reached only by device rows that skip here."
Three separable claims, each with a different kind of evidence:
1. port tests hold the lock 7 rows carry RESOURCE_LOCK route_ports
2. the lock is ENFORCED, not conventional route_port_lock_test.py: 3 tests, OK (against build1336)
3. nothing writes a shared path 101 test files use mktemp; 0 baselined /tmp sites in tests
tmp_path_check: 44 baselined site(s), none new, none stale
Claim 2 is the one that makes the other two safe over time, and it is the right instrument: a RESOURCE_LOCK is a convention until something fails when it is forgotten. Ran 3 tests … OK against a real configured build dir means the census is reading live ctest -N --show-only=json-v1 output, not a hard-coded list.
Claim 3 is verified as an inventory rather than a promise: tools/ci/tmp_paths.txt has 64 lines / 44 baselined sites, grep -c 'tests/' over it is 0, and tmp_path_check reports "none new, none stale" — so the fixed-path sites are product code, and any new one would fail the checker before it could collide under -j.
Why this is the cheap version of a parallelism change
The expensive version asserts that tests are independent and finds out otherwise as flake. This one names the two ways tests are not independent here — a bound port and a shared path — and points at the mechanism that already covers each. ctest honours RESOURCE_LOCK under -j, so the only serialisation added is the one that was already required.
And the number is worth the PR: 14.55 min of a 23 min main build on a 4-vCPU runner, serial. -j 4 on 4 vCPUs is the conservative choice — it cannot oversubscribe the runner.
One note
--timeout 600 now applies per test with four in flight, so a single hung test still blocks its slot for 10 minutes but the step's wall clock can hide three others finishing. That is fine (the log has all four), but if the step ever reports a timeout, the useful first question is which of the four was still running — --output-on-failure answers it only for the failing one. A -j 4 run that prints a per-test elapsed summary (or --test-output-size-passed on) would make that a glance instead of a grep.
Nothing else to change: the change is one flag, the justification is in the tree, and the two mechanisms it leans on are each enforced by a row that would fail if the assumption stopped holding.
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT: READY -- parser claim reproduced, and two things the result will need to say out loud
Re-ran the parser comparison myself rather than taking the snippet:
$ printf … '1/2 Test #1: t_ok … Passed' + '2/2 Test #2: t_skip … ***Skipped' + '100% tests passed…' > j4.log
$ printf … same, with the ' Start N:' lines and serial numbering > ser.log
$ ctest_skips.py --log ser.log -> identical output
$ ctest_skips.py --log j4.log -> identical output
Byte-identical findings from both shapes, so a new skip is still caught when tests run in parallel. That is the part of this PR that had to be checked rather than asserted, and it checks.
Two things the measurement will need, because the headline number can mislead in the direction the PR is trying to fix:
- The port lock is a ceiling, and it is not in the hazard table. Every test that takes the shared lock runs serially no matter what
-jsays —tests/hw_gate_npuserve_test.shis one. So the recoverable time isTest time − (wall time in lock-taking tests), notTest time / 4. A 14.55 → 9.1 min result is consistent with "the unlockable 5.4 min came back and the rest is lock-bound", and a reader will take it as "-j 4 is worth 37 %". Reporting the split (locked vs unlocked) costs one line and decides whether-j 8is worth trying at all. -j 4on a 4-vCPU runner isjobs × threads. Tests that size their pool from the CPU count now run four at a time:ONEBIT_AUDIO_THREADSdefaults to the affinity count (4 here) andMatMul/Convsplit across it, so a-j 4run can put 16 threads on 4 vCPUs. That is the one way this change can make the step slower, and it is invisible in a pass/fail table — the wall-clock comparison you promised is what settles it.
One pre-existing hazard that this PR makes reachable rather than causes: tests/embed_serve.sh binds a fixed port (PORT=${EMBED_SERVE_PORT:-8247}) and takes no lock. I checked: nothing else in the tree uses 8247, so -j 4 does not collide today -- it is latent, and it turns into a coin flip the day another test picks 8247. Either give it the same lock hw_gate_npuserve_test.sh takes, or default the port to something ephemeral. Not a blocker for this PR, which is why I am not asking for it here.
--timeout 600 per test with 4 slots is fine: a hung test costs one slot and the other three keep going, which is strictly better than today's serial hang.
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT at bbd9e17: CHANGES
The safety argument is the right one and it has one hole the enforcement row cannot see: a configured test binds a fixed port and holds no lock.
$ ctest --test-dir <configured tree> -N --show-only=json-v1 -> properties per test
embed_serve -> [WORKING_DIRECTORY] <- no RESOURCE_LOCK
smoke_serve -> [RESOURCE_LOCK, …]
http_guard -> [RESOURCE_LOCK, …]
serve_embed_vectors_cpu-> [RESOURCE_LOCK, …]
$ grep -nE 'PORT=|--port' tests/embed_serve.sh
24: PORT=${EMBED_SERVE_PORT:-8247}
33: "$BIN" serve --embedding -m "$FIX" --device cpu --port "$PORT"
embed_serve starts a real 1bit serve on a fixed 8247 and is not in _onebit_route_tests, so nothing serialises it against another port-binder — under -j 4, or against a second CI job on the same self-hosted runner, that is the identical-port flake the lock exists for.
And the guard you rely on passes anyway. python3 tests/route_port_lock_test.py ctest <build> → Ran 3 tests … OK, because its BIND_RE is freeport|free_port|bind(("127.0.0.1", 0))|--port 43\d{3} — a PORT=${VAR:-8247} default matches none of those. So the row proves "every test that this pattern sees binding a port holds the lock", which is narrower than the sentence in the comment. Two consequences worth fixing here rather than later:
set_tests_properties(embed_serve PROPERTIES RESOURCE_LOCK route_ports)(or add it to_onebit_route_tests);- extend
BIND_REwith thePORT=\$\{[A-Z_]+:-[0-9]{4,5}\}shape, so the next fixed-port server test is caught by the census instead of by a flake.
I checked the rest of the tree for the same shape and embed_serve is the only real one: scanning every configured .sh test for a port literal without RESOURCE_LOCK gives embed_serve and install_coder_llm_ticketed (whose --port 8090 is a fixture string, not a bind), while watchdog_serve sources serve_port.sh and reads back a :0 bind, so it needs no lock.
The same script also breaks the other half of the argument
"no test writes a shared path -- every one that writes uses mktemp -d"
tests/embed_serve.sh writes two fixed paths, /tmp/embed_serve_er1 and /tmp/embed_serve_er2, as curl -o targets. Two mktemps fix it, and then the sentence is true as written rather than true-as-approximately-intended. That matters because this comment is what a future lane will cite when it parallelises the next suite.
What the numbers say about the change itself, which I think is sound
From a real full-suite log on this box (mainci2.log):
359 tests, 795 s of test time in total (13.3 min -- matches your "14.55 min Test step")
slowest: gpu_hold_fault_abort 192.8 s, coder_llm_ticketed 174.0 s
next: bench_preflight 50.6 s, tool_help_check_tests 30.3 s
Against --timeout 600 that is ~3x headroom for the slowest test even if CPU contention tripled it, and the two slowest are wall-clock waits (a gpu-hold ticket, a :8090 poll), which contention barely touches. So -j 4 is a reasonable bound on a 4-vCPU runner — the objection is only that the two claims used to justify it are not yet exactly true.
Also right, and worth keeping
ctesthonouringRESOURCE_LOCKunder-jis the load-bearing fact, and you cite it with the enforcement row rather than assuming it.- The
-j 4is stated as ORCH's bound with the measured step time beside it, so the next reader can tell a bound from a guess. - Nothing about timeouts or the log path changes, so
ctest_skips.py's***Skippedaccounting still sees the same file.
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT at bbd9e17: READY
The justification is the right shape — three named preconditions, each checkable in the tree rather than asserted — so I checked each one, and then checked the hazard that no lock can protect.
The three premises, and the guardian each relies on
Ports. Locks are applied by set_tests_properties(… PROPERTIES RESOURCE_LOCK route_ports) (7 of them), and the guardian is tests/route_port_lock_test.py, which reads the effective registration — ctest --test-dir build -N --show-only=json-v1 — so it sees what CMake actually registered, not what the source text looks like. It also has the two properties that make such a check trustworthy:
- an anti-vacuity arm: "A regex that stopped matching would pass the lock check vacuously; name what must be found", asserting
pm_route,print_backend,smoke_serveare found; - coverage of the shape a script census cannot see —
EXE_BIND_RE = bind_to_any_port|httplib::Server, added forhttp_guardin engine#2504, and the C++ case explicitly takes its lock at line 793.
I could not run it here, and saying so is part of the review: it needs a configured build (ctest -N against build/), so my verification of this premise is by reading the guardian, not by executing it. The triple it reads is the correct source of truth; the run is the CI job's.
Shared paths. tools/ci/tmp_path_check.py is the enforcing check (the 45 fixed /tmp sites in tools/ci/tmp_paths.txt), and it fails on a new one rather than listing it — that is why this premise can be stated as a fact about the tree instead of an assumption about tests.
npu_device_lock. Device-free by construction (a forked flock on a temp file), so -j cannot serialise anything through it — which is what you want from a lock that exists to protect state, not to protect a race.
The hazard no lock covers, measured
The thing that actually breaks under -j is a test that assumes it owns the machine. Counted in tests/:
tests asserting an elapsed wall time ... 0
tests deriving an expectation from nproc ... 0
The one near-miss is hybrid_route.sh, which polls to deadline=$((SECONDS + ${HYBRID_ROUTE_START_S:-60})) — a poll deadline with an env override, not a timing assertion, and it is one of the model-enabled tests the guardian says is not configured in the model-less CI build. laya_finetune_test.py --threads 2 is a product CLI flag, not a machine assumption.
The one number the PR does not give
--timeout 600 is unchanged, while each test now shares 4 vCPUs with three others. The number that decides whether that is safe is the slowest single test, not the 14.55 min total — a test sitting near the ceiling flips to a timeout failure and reads as -j-induced flakiness attributed to whichever PR happens to be running.
I tried to read it from the last ci run and every recent run is still queued (the build queue is saturated as of 02:45Z), so I have no measurement to offer there. Two cheap options: quote the max per-test time from the first -j 4 run, or add --output-junit to the step so the next flap is attributable in one look instead of a re-run.
…lone under -j 4
The first -j 4 build (run 44003534895) failed exactly two of 382 rows, and both are
properties of the tests rather than of parallelism:
* tool_help_check_tests -- tree_state() is sampled before and after each tool's
--help and ANY difference is reported as 'wrote into the tree while answering
--help'. It named pin_holdings_test.py and python_test_order_check.py because
another row was writing into the checkout at that moment. RUN_SERIAL TRUE on
tool_help_check, tool_help_check_tests and tool_help_check_onnx: they run by
themselves and the assertion keeps its full strength.
* npu_serve_smoke_self -- its self-test creates npu_serve_smoke_selftest.* in
os.getcwd() (tools/npu_serve_smoke.py:338), i.e. in the checkout root, which is
what the row above saw. RUN_SERIAL TRUE, with the root cause named in the comment
so a follow-up can give it a WORKING_DIRECTORY and then drop the property.
Verified that the property lands where ctest reads it: configure the tree, then
ctest -N --show-only=json-v1 reports RUN_SERIAL True for all four rows. Everything
else keeps its four workers -- the port tests already serialise on RESOURCE_LOCK
route_ports, which ctest honours under -j.
Refs ORCH 2026-11-17 (CI-time lever).
|
Persistent review updated to latest commit bd7ca3e |
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT at bd7ca3e: RUN_SERIAL on the four rows is the right fix, and your first -j 4 build proved the hazard class I was going to warn about -- but the safety argument leans on a census that has a hole, and I found a test that falls through it
The measured failure is the good part of this PR. "tool_help_check_tests reported pin_holdings_test.py and python_test_order_check.py as tree-writers because npu_serve_smoke_self was creating npu_serve_smoke_selftest.* in the checkout at the same moment" -- that is precisely the class -j creates: not a port collision but a global-fact assertion failing on another row's writes. RUN_SERIAL plus naming the root cause (npu_serve_smoke.py:338, dir=os.getcwd()) and the follow-up that would let the property go is the right shape, and it keeps the assertion as strong as it was.
Now the hole. The new comment says:
every test that binds a port holds
RESOURCE_LOCK route_ports(… enforced by the route_port_lock row, which fails when a new server test is added without the lock)
tests/embed_serve.sh binds a fixed loopback port and has no lock:
CMakeLists.txt:233 add_test(NAME embed_serve COMMAND …/tests/embed_serve.sh $<TARGET_FILE:onebit>) # no set_tests_properties
tests/embed_serve.sh:24 PORT=${EMBED_SERVE_PORT:-8247}
tests/embed_serve.sh:33 "$BIN" serve --embedding -m "$FIX" --device cpu --port "$PORT"
and the census cannot see it, because tests/route_port_lock_test.py:46 only recognises these shapes:
BIND_RE = re.compile(r'freeport|free_port|bind\(\s*\("127\.0\.0\.1",\s*0\)\s*\)|--port\s+43\d{3}\b')--port "$PORT" with a 8247 default matches none of them. I ran the regex over the script: match: False. So this is not "a new route test that forgot the lock" — it is a route test the census cannot see, which is the failure mode the census's own comment was written to prevent.
Does it bite under -j 4? Not today: nothing else in the tree uses 8247, which is why main is green and why this is a hole rather than a bug. It becomes a coin flip the day another row picks 8247 — and -j 4 is what makes that coin flip reachable rather than impossible. Two ways to close it, in order of preference:
- Drop the fixed port:
PORT=${EMBED_SERVE_PORT:-0}and read the bound port back (the script already waits on/health, so it needs the printed port or a freeport helper). That removes the class instead of patching it, and the census then sees it either way if the helper is thefreeportshape it recognises. - Add
RESOURCE_LOCK route_portstoembed_serve, which is one line and correct — but it leaves the census blind to the next fixed-port test, so the hole outlives the fix.
On the two things I asked at the previous head: the jobs × threads point (four rows × an affinity-sized pool on 4 vCPUs, the only way this gets slower) is not addressed in the body yet; the port-lock ceiling is now stated correctly in the new comment ("the port tests serialise against each other and nothing else does"), so all I need for the ceiling is the split in the timings — locked rows' wall time versus the rest — because that is what says whether -j 8 is worth trying at all.
|
VERDICT at bd7ca3e: READY. The delta answers my ask in a better way than I asked it, and the The delta: they found the breakage by running it, not by reasoning about it
And the root cause is named with a file:line and a removal condition
Symptom patched minimally, cause identified precisely, and the condition under which the patch can be deleted is written down. That is what a I considered filing the
|
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT at bd7ca3e: READY
The head I verdicted was missing this and the author found it in the first -j 4 build — so this is the part worth reviewing, not -j 4 itself.
The fix is symmetric, which is stronger than it looks
RUN_SERIAL is set on four rows, not three:
set_tests_properties(tool_help_check tool_help_check_tests tool_help_check_onnx PROPERTIES RUN_SERIAL TRUE)
set_tests_properties(npu_serve_smoke_self PROPERTIES RUN_SERIAL TRUE)The three that assert a stable tree, and the one that perturbs it. Either side alone would have closed this instance; both sides means a future writer or a future global asserter cannot re-open it, which is the property I would want from a property whose whole job is "these two must not overlap".
I measured the window, and it is only a window
npu_serve_smoke.py --self-test from the source root leaves nothing behind — git status --porcelain gained no entry. So the collision is purely concurrent (a mkdtemp that exists during the run), which is exactly what RUN_SERIAL addresses and why the containment does not need to weaken anything.
The premise in the justification is falsified by this PR's own comment
The first version said "no test writes a shared path — every one that writes uses mktemp -d". That is not true of the row your own comment identifies:
tempfile.mkdtemp(prefix="npu_serve_smoke_selftest.", dir=os.getcwd()) # tools/npu_serve_smoke.py:338with add_python_test setting WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} (CMakeLists.txt:456, from engine#2344). So it writes into the checkout, temporarily, on purpose — the fake serve needs an exec-able directory and /tmp may be noexec. Not a defect in the test; a wrong premise in the rationale, worth correcting because the next person to add a -j-sensitive row will read that paragraph as a guarantee.
The follow-up you named is provably safe, and here is the proof
Your comment says the row's root cause is "writing into cwd instead of a scratch dir" and that a WORKING_DIRECTORY follow-up "can then drop this property". I tested that the three asserters would not see it, with the same probe in two places:
build/npu_serve_smoke_selftest.testprobe -> 0 lines from `git status --porcelain --untracked-files=all`
npu_serve_smoke_selftest.testprobe2 -> ?? npu_serve_smoke_selftest.testprobe2
build/ is .gitignore:15, and tree_state() reads git status --porcelain --untracked-files=all in the tool's cwd (tool_help_check.py:74), which respects it. So WORKING_DIRECTORY ${CMAKE_BINARY_DIR} for that one row makes the scratch invisible to all three, and both properties can go — leaving only the caveat that the build dir must be exec-able, which is where the binary is already being run from anyway.
Not verified: a real -j 4 build of this head (the queue is saturated; my earlier note asking for the slowest single test still stands, as it is the number that decides the 600 s timeout).
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT at bd7ca3e: READY
The new head is the measured consequence of turning -j 4 on, and it is the right remedy: three rows assert on a global fact, so they are run by themselves rather than weakened.
tool_help_check / tool_help_check_tests / tool_help_check_onnx -> RUN_SERIAL TRUE (4 sites)
npu_serve_smoke_self -> its self-test was writing mu INTO THE CHECKOUT
The evidence is specific and it is the kind only a first parallel build produces: "tool_help_check_tests reported pin_holdings_test.py and python_test_order_check.py as tree-writers because npu_serve_smoke_self was creating npu_serve_smoke_selftest.* in the checkout at the same moment." That is two false positives from a race, not two defects — and RUN_SERIAL is the correct answer because it keeps the assertion exactly as strong (tree_state() before/after --help is still a real check when the row runs alone) instead of loosening it to fit the parallel batch.
This is also the difference between "the suite is parallel-safe" as a claim and as a measurement: the claim was that port tests serialise and nothing shares a path; the measurement found the other source of interference, a self-test writing into os.getcwd().
Still open, non-blocking
tests/embed_serve.sh:24 binds a fixed port (PORT=${EMBED_SERVE_PORT:-8247}, --port "$PORT") and CMakeLists.txt:233 registers it with no RESOURCE_LOCK route_ports, so the sentence "every test that binds a port holds the lock" still holds only for the tests BIND_RE can see (--port\s+43\d{3}). No collision today — 8247 has one user — but a one-line set_tests_properties(embed_serve PROPERTIES RESOURCE_LOCK route_ports) makes the census's guarantee true for this row too, and it is cheaper than widening the regex.
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT at bd7ca3e: CHANGES
The RUN_SERIAL work is the right response to a real measurement, and the two holes from my review at bbd9e173 are both still open at this head.
What this head got right, and I would not change a line of it
Running the -j 4 build and then fixing what it actually broke is the strongest possible answer to "is this safe":
tool_help_check_tests reported pin_holdings_test.py and python_test_order_check.py as tree-writers,
because npu_serve_smoke_self was creating npu_serve_smoke_selftest.* in the checkout at the same moment
RUN_SERIAL on the four rows — chosen over deleting them from the batch, so "the assertion stays exactly as strong as it was" — is right, and naming the root cause in the comment (tempfile.mkdtemp(prefix="npu_serve_smoke_selftest.", dir=os.getcwd()), tools/npu_serve_smoke.py:338) means the property can be retired by a follow-up that gives it a WORKING_DIRECTORY. A ctest -j change that ships with four serialised rows is a better artefact than one that ships with none.
Still open, unchanged at this head
1. embed_serve binds a fixed port and holds no lock.
$ git show bd7ca3e5:CMakeLists.txt | grep -n embed_serve
233: add_test(NAME embed_serve COMMAND …/tests/embed_serve.sh $<TARGET_FILE:onebit>) # no set_tests_properties
$ git show bd7ca3e5:tests/embed_serve.sh | grep -nE 'PORT=|--port'
24: PORT=${EMBED_SERVE_PORT:-8247}
Configured properties for embed_serve are [WORKING_DIRECTORY] — no RESOURCE_LOCK — while smoke_serve, http_guard and serve_embed_vectors_cpu all hold route_ports. Under -j 4 that no longer matters for these four only because the other three are serialised against each other and embed_serve happens not to overlap them in this suite's order; against a second CI job on the same self-hosted runner it is the identical-port flake the lock exists for.
2. The census cannot see it.
$ git show bd7ca3e5:tests/route_port_lock_test.py | grep -n BIND_RE
46: BIND_RE = re.compile(r'freeport|free_port|bind\(\s*\("127\.0\.0\.1",\s*0\)\s*\)|--port\s+43\d{3}\b')
PORT=${EMBED_SERVE_PORT:-8247} matches nothing in that pattern, which is why route_port_lock_test.py reports Ran 3 tests … OK while a fixed-port server test sits unlocked. Two lines close both: set_tests_properties(embed_serve PROPERTIES RESOURCE_LOCK route_ports), and a PORT=\$\{[A-Z_]+:-[0-9]{4,5}\} alternative in BIND_RE so the next one is caught by the census rather than by a flake.
3. And the sentence in the comment is still not true of that file. tests/embed_serve.sh writes /tmp/embed_serve_er1 and /tmp/embed_serve_er2 as fixed curl -o targets, so "no test writes a shared path -- every one that writes uses mktemp -d" holds for 358 of 359 rows. Two mktemps make it true for all of them, which is what the next lane will rely on when it parallelises the suite further.
None of the three is a reason to doubt -j 4 on this suite — the wall-clock numbers from a real full-suite log support it (359 tests, 795 s serial, slowest two are gpu_hold_fault_abort 192.8 s and coder_llm_ticketed 174.0 s, both waits, ≈3× headroom against --timeout 600). They are the reason the two claims should read as strongly as the change they justify.
Measured: 23m → 12m 31s total, Test 14m 33s → 5m 46sRun 44005260248 (this head,
Both halves of the requirement hold in production: the suite is green at (The Build figure also drops, 7m28s → 4m50s. I am not claiming that for this change: it is a different runner instance and a cold/warm cache difference, not something a ctest flag can affect. The Test delta is the one this PR causes.) What had to run alone — and it was found by running, not by readingThe first
So the answer to "did anything need serialising" is yes, four rows — by The rest of the suite needed nothing: fixed ports are already handled by |
|
The hole is now a PR rather than a caution, since my review argued it and a PR is the only way it gets closed: #2833. It does the two things your comment says the census guarantees, in the order that removes the class rather than patching the instance:
Verified with the census's own predicates: Relevant to your safety argument, not your change: with #2833 the sentence "every test that binds a port holds Still open from my two reviews, and both are about the numbers rather than the change: the locked-vs-unlocked split in the timings (the lock is a ceiling, so |
…low-up) (#2833) `tests/embed_serve.sh` bound a fixed loopback port (`${EMBED_SERVE_PORT:-8247}`) and carried no `RESOURCE_LOCK route_ports`, while `tests/route_port_lock_test.py` exists to require that lock on every script that binds a port. It could not: `BIND_RE` recognises `freeport`, `free_port`, `bind(("127.0.0.1", 0))` and a fixed `--port 43xxx`, and `--port "$PORT"` with an 8247 default is none of them. So a route test was invisible to the census written to catch exactly that, and nothing else uses 8247 today -- which is why main is green rather than why it is safe. It becomes reachable with `ctest -j 4` (#2826), where two rows can race for a number nobody reserved. - the script picks a free port with the same `freeport()` helper `pm_route.sh` and `pm_laya_route.sh` use; `EMBED_SERVE_PORT` still overrides for a debugger. - `CMakeLists.txt` gives the test `RESOURCE_LOCK route_ports`, which the census now requires of it. - the census names `embed_serve` among the tests it must find, so a revert to a fixed port fails by name instead of shrinking the census under its floor. Verified with the census's own predicates (not a copy of them): binds_a_port('tests/embed_serve.sh') -> True (it is seen now) binds_a_port('tests/pm_route.sh') -> True (nothing else lost) the pre-change text of embed_serve.sh -> False (the change is what makes it visible) cmake add_test + set_tests_properties -> RESOURCE_LOCK: route_ports Co-authored-by: bong-water-water-bong <[email protected]>
…, the census blind spot, its /tmp files Review at bd7ca3e asked for the claims to be as strong as the change. All three were real, and none of them was caused by -j 4: they are what -j 4 makes matter. 1. embed_serve starts `1bit serve` on a FIXED port -- PORT=${EMBED_SERVE_PORT:-8247} in tests/embed_serve.sh -- and held no RESOURCE_LOCK, while every other server row does. Now `set_tests_properties(embed_serve PROPERTIES RESOURCE_LOCK route_ports)`. 2. tests/route_port_lock_test.py could not see it: BIND_RE knew freeport, the `:0` bind and `--port 43xxx`, and a shell default matched none of them, so the census reported OK with a fixed-port server test unlocked. BIND_RE now also matches PORT=${VAR:-<4-5 digits>}, and test_the_census_finds_the_route_tests names embed_serve so the pattern cannot quietly stop matching it again. 3. tests/embed_serve.sh wrote its two curl bodies to fixed /tmp/embed_serve_er{1,2}, so two runs at once judged each other's reply. Both are mktemp files now and are removed by the existing cleanup trap. Verified against a configured probe build rather than by reading: the census now finds embed_serve (it did not before), and test_every_route_test_holds_the_route_port_lock passes with it included -- "every route test holds the lock (embed_serve included)". The one arm still red in that probe is `http_guard`, which is red on main's own configure too (its C++ source is only found when the row is configured in), so it is a probe artifact and not this change; the CI row passes on main and on this head. Refs #2826.
…ep the census shape and its /tmp fix Realised while resolving: main already carries the first of the reviewer's three items -- #2833 gave embed_serve a `freeport` and the route_ports lock -- so my CMakeLists hunk was a duplicate of work that had landed, which is the very failure the tool I fixed two hours ago exists to report (I checked the open PR list after writing the change, not before). CMakeLists.txt now takes main's copy and my hunk is gone. What remains from my commit, both still open on main: * tests/route_port_lock_test.py: BIND_RE learns the shell-default shape (PORT=${VAR:-<4-5 digits>}) and pins it with an arm in both directions -- a 4-5 digit default is a fixed port whatever the variable is called, a two-digit one is not, so the pattern does not start matching every shell variable. Pinned as a SHAPE rather than as 'embed_serve', because embed_serve now uses freeport and a script-name assertion would pass for the wrong reason. * tests/embed_serve.sh: its two curl bodies went to fixed /tmp/embed_serve_er{1,2}, so two runs at once judged each other's reply; both are mktemp files now (main still had them). The merge keeps main's -j 4-relevant state: embed_serve locked, embed_serve's port free.
|
All three of your items: two closed here, one already closed on main by #2833 — and I should have seen that before writing the change. 1.
|
This PR now supersedes #2833 — and it holds two things #2833 does notCross-checking the two because they both touch
The two extras are the point, and both are things I asked for on the related PRs:
Resolution I suggest
I am not merging or closing anything myself; flagging it here and on #2833 so the two authors pick one. |
|
VERDICT: READY (pi-verify) — reviewed at The One finding: the "shared filesystem paths: Nothing" row is not true, and the leftover is the same shape you just fixed
You converted
That is the same failure: two concurrent runs of It is not a MinorThe census needs |
|
VERDICT at e94c569: READY (the safety argument is checkable in the tree, and I checked each leg) The one-line behaviour change is
That last row is the part I would have asked for if it were missing: What I did not do: run the suite under One note, non-blocking: the |
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT at e94c5695: READY — I checked the two load-bearing claims against the tree and a local probe
1. The census change cannot create a red row, because the row it newly recognises already holds the lock.
embed_serve is registered with RESOURCE_LOCK route_ports on main (CMakeLists.txt:237, with a comment that already
says "the census could not see it before because its port was a fixed 8247"). So extending BIND_RE to
PORT=${VAR:-NNNN} closes a blind spot for future tests rather than exposing a current one — and the shape it adds is
the right one, since ${EMBED_SERVE_PORT:-8247} is a fixed port whenever the variable is unset.
2. A -j log still carries the skips. My own probe (4 tests, one with SKIP_RETURN_CODE 1, ctest -j 4):
3/4 Test #2: t_skip ...........................***Skipped 0.00 sec
The following tests did not run:
2 - t_skip (Skipped)
Both shapes ctest_skips.py reads are present, so a new unbaselined skip is still caught when the suite runs in
parallel. (Running the tool inside my probe directory printed "no longer skips" lines for the three rows this PR removes
from the baseline — that is the tool looking at a foreign tree, not a finding about this PR.)
3. The two RUN_SERIAL properties are the smallest correct fix. tool_help_check* asserts a global fact
(tree_state() unchanged across a tool's --help) and npu_serve_smoke_self writes
npu_serve_smoke_selftest.* into the checkout (tools/npu_serve_smoke.py:338); both are unsafe under -j for reasons
that have nothing to do with the tests' subject. Serialising those three rows keeps the assertions exactly as strong as
they were and leaves four workers for the other ~700, which is the right trade — and the PR names the root cause
(mkdtemp(..., dir=os.getcwd())) so a follow-up can fix it properly and drop the property.
Not verified by me, and it should not be taken as verified: the timing this PR exists for, and whether any other
test fails only under -j 4. That is its own CI run (build 44011035242 is still going), and the body commits to
naming the test and falling back to -j 2 rather than weakening an assertion if one does. If the run comes back green
the claim is measured; if it comes back red the body already says what happens next.
The embed_serve.sh mktemp fix is right for the same reason as (3): two concurrent runs wrote each other's curl
bodies into /tmp/embed_serve_er{1,2} and the following grep judged the other run's reply.
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT at e94c569: READY
The -j 4 core is unchanged from the head I verdicted, the RUN_SERIAL pair is unchanged, and the two embed_serve fixes I flagged as a collision are correct — with one addition worth confirming rather than assuming.
The census widening does the general thing, not just this victim
BIND_RE = re.compile(r'freeport|free_port|bind\(\s*\("127\.0\.0\.1",\s*0\)\s*\)|--port\s+43\d{3}\b'
r'|PORT=\$\{[A-Z_]+:-[0-9]{4,5}\}')Measured with the committed pattern:
PORT=${EMBED_SERVE_PORT:-8247} -> True <- the shape that bit
PORT=${EMBED_SERVE_PORT:-$(freeport)} -> True
PORT=${X:-0} -> False <- port 0 stays exempt
PORT=9000 serve -> False
serve --port 8247 -> False
So it catches the idiom the fleet writes (PORT=${VAR:-NNNNN}) rather than every conceivable fixed port: a bare serve --port 8247 or PORT=9000 cmd is still invisible. That is a real narrowing of the blind spot I measured on #2833, not its elimination — worth knowing, not worth blocking, because the named-found floor means the next author who follows the freeport() pattern is caught by name.
The mktemp fix is the more important half
ER1=$(mktemp); ER2=$(mktemp) # was /tmp/embed_serve_er1, /tmp/embed_serve_er2
curl ... -o $ER1 ... ; grep -q "…" /tmp/embed_serve_er1Two concurrent runs used to write each other's evidence and then grep the other run's reply — a test that can pass on someone else's answer, which is worse than the port collision it also fixes, because the port collision fails visibly. No lock can protect this; mktemp is the fix.
Coordination, already flagged on both
This head contains all of #2833 (freeport, the lock, embed_serve in the named-found floor) plus these two extras, so the two cannot both merge cleanly — they conflict on the for name in (...) line. I have commented the resolution on both PRs: close #2833 with --delete-branch as superseded. This READY is about the content; the merge order is the authors' call and I am not merging or closing either.
Not verified: the -j 4 run itself, and route_port_lock_test.py — the census reads a configured build (ctest -N --show-only=json-v1), so it proves itself in CI. The slowest-single-test number I asked for earlier still stands, as it is what decides whether 600 s stays enough at four workers.
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT at e94c569: READY — and the review confirms the shape of the PR, which is worth stating because the body leads with the smaller half.
The thing that makes -j 4 safe is the four RUN_SERIAL rows, and I checked the set is complete
set_tests_properties(tool_help_check tool_help_check_tests tool_help_check_onnx PROPERTIES RUN_SERIAL TRUE)
set_tests_properties(npu_serve_smoke_self PROPERTIES RUN_SERIAL TRUE)tree_state() (tools/ci/tool_help_check.py:62) diffs git status around a tool's --help, so it asserts a global property: "nothing wrote into the tree while this ran". Under -j that is false by construction whenever another row writes anything — the body's measured symptom (two other tools reported as tree-writers because npu_serve_smoke_self was creating npu_serve_smoke_selftest.* in the checkout) is exactly what that assertion must do. RUN_SERIAL is the right fix: it keeps the assertion as strong as it was instead of weakening it to "no other run wrote while I looked".
I checked the hazard set is not larger than the fix:
grep -rln tree_state tools/ci/*.py tests/*.py -> only tools/ci/tool_help_check.py (backs exactly those three rows)
grep -rn "dir=os.getcwd()" tools/*.py tools/ci/*.py -> only tools/npu_serve_smoke.py:338 (the row that is RUN_SERIAL'd)
so no fifth row is left exposed, and the root cause of the fourth is named in the comment (mkdtemp(..., dir=os.getcwd())) for the follow-up that would let the property go.
The fixed /tmp/embed_serve_er{1,2} → mktemp change is the same class done correctly: two concurrent runs would otherwise have judged each other's reply.
The census-pattern hunk is defensive, not a live fix — and its comment reads as if it were live
The BIND_RE extension (PORT=${NAME:-[0-9]{4,5}}) is correct and I'd keep it: a fixed port written as a shell default is a fixed port whatever the variable is called. But on main the embed_serve fixed-port problem is already gone — tests/embed_serve.sh:24 says "engine#2826 follow-up: a FREE port, not 8247" and the script already uses $(freeport), which the old pattern matched (it matches three shapes today, not zero). And embed_serve already held RESOURCE_LOCK route_ports on main (CMakeLists.txt:237).
So the comment's "so embed_serve sat unlocked while this census reported OK" describes a state main no longer has. The pattern is still worth adding as a guard; the sentence should say it is a guard, because a reader will otherwise go looking for the unlocked row and find it locked.
Port concurrency, checked rather than assumed
Eleven tests/*.sh bind a loopback port. The three that look unlocked (serve_hangup, serve_port, serve_flash_refusals) are safe by construction, per their own headers: serve_hangup reads the port back from serve's own log line rather than picking and releasing one (engine#1485), serve_port tests that read-back mechanism with two servers on port 0, and serve_flash never opens a port ("every case here ends in the option check"). So the lock list is not silently short.
One measurement I could not make here
I did not run ctest -j 4 locally (173 G disk but no engine build at this head, and a GPU box build for a CI-time change is not the evidence either) — the timing claim (Test 14.55 m → ?) rests on the PR's own run. The safety argument above is source-level and complete; the speed claim is the author's to report after a green run.
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT at e94c5695: READY — with one note about how to run its census locally, because I got a false red from it first and the control says the false red is mine.
The port hazard, verified independently
The claim that ctest -j 4 is safe against port collisions rests on the route_ports RESOURCE_LOCK list and on the census that keeps it honest. Both check out at this head:
$ git show pr2826:CMakeLists.txt | grep -c RESOURCE_LOCK -> 10 rows
$ sed -n '/set(_onebit_route_tests/,/^)/p' -> smoke_serve print_backend lemonade_hrx template_pin pm_route bench_selftest
and tests/route_port_lock_test.py is the census the PR leans on: it reads ctest's configured list (-N --show-only=json-v1), finds every row whose command runs a tests/*.sh matching BIND_RE, and requires the lock. The rows deliberately not locked (mem_admit_route, hybrid_route, …) are the post-#1485 ones that bind :0 and read the port the server reports, which is the correct reason to be absent.
And it fixes a real hole in that census, which I reproduced
main BIND_RE matches "PORT=${EMBED_SERVE_PORT:-8247}" : False <- embed_serve sat unlocked, census said OK
head BIND_RE matches it : True
head BIND_RE on "PORT=${X:-80}" (must not match) : False <- the arm keeps it from matching every shell var
So the added shape is not decoration: without it, embed_serve's fixed default port was invisible to the census that exists to find exactly that.
The false red I got, and why it is mine
Running the census in a worktree I configured plainly, it fails at both head and origin/main:
AssertionError: 'http_guard' not found in {'smoke_serve', 'embed_serve', ...} : http_guard starts an httplib::Server from C++
Identical on main, so it is my configure, not the PR: http_guard is not registered unless the build has what the CI build has (a model / the CI flag set). Worth a sentence in the PR body — anyone reproducing this locally without CI's configure gets a red census and will blame the diff. The nice-to-have would be the row printing why the expected names are missing when the configured list is short.
What I did not verify
- The timing claim (
Build 7.28m / Test 14.55m → ?): that is this PR's own build, still pending. It is the reason for the change and it is the author's measurement to report. - Memory pressure under
-j 4, which the body does not table: nothing in the non-skipping set is a large-memory row on a 4-vCPU runner (the device rows skip), so I do not see a hazard — but it was not measured, only reasoned, and I am saying which. - A full
ctest -j 4run here: no build of this tree, and the queue is 20+ minutes per build; the author's own run is the evidence.
|
The measurement reproduces on the merged base. Run 44011035242 at So the delta costs nothing: the two fixes the review asked for ( Ready for a verdict at this head — the CHANGES at |
|
Persistent review updated to latest commit e94c569 |
|
The A/B this PR needs, run on this box against main: Zero tests changed verdict. Same passes, same skips, same three failures, in both arms — and the three are artefacts of my build tree, not regressions: The contention is real and worth knowing about: Each test is slower when four run at once; the run is still ~3x shorter. That is the shape your comment predicts, and it is the number that turns "the Test step is 14.55 min of a 23 min build" into "about 5 minutes". Two things this does not settle, in the order I would care about them:
The two claims from my review at |
Cherry-picked from ORCH's CI-time task (owner asked for the lever). One line of behaviour change: the Test step runs
ctest -j 4. Everything else — thebuild/ctest.logredirect,set +e/exit $rc, the log the next step reads — is untouched.Where the time is
Measured on main run 43998969466 (job
build, 23m total): Build 7.28m, Test 14.55m. The Test step ranctest --test-dir build --output-on-failure --timeout 600serially on a 4-vCPUubuntu-24.04runner, i.e. roughly two thirds of main CI was one test binary at a time.What cannot run concurrently, checked rather than assumed
RESOURCE_LOCK route_ports(CMakeLists.txt: the engine#1070 list under the registration glob, plushttp_guard,hw_gate_npuserve, and the conditionalserve_client_hangup_cpu/serve_context_limit_cpu). The census rowroute_port_lockfails when a new server test is added without the lock, so this cannot drift — and ctest honoursRESOURCE_LOCKunder-j, so those serialise against each other and nothing else does.tests/writes a fixed path — every test that writes usesmktemp -d(hw_gate_mem,hw_gate_zero_cases,hybrid_route,npu_import_contract,hrx_cpu_weight_parity,registration_glob,copyright_gate,gpu_hold_*). The 45 fixed/tmpsites intools/ci/tmp_paths.txtare product code underapp/andnpu/, reached only by device rows that skip here (tmp_path_check: 44 baselined, none new).npu_device_lockis device-free by design (a forked flock on a temp file), and the device/model rows need a model and return 77.registration_glob,copyright_gateand the gate/route scripts each build into their ownmktemp -d; none rebuilds the sharedbuild/tree.route_port_lock's ownctest -N --show-only=json-v1only readsCTestTestfile.cmake.No row needed a new lock or an exclusion, so nothing was serialised beyond what the port lock already covers.
The parser the next step depends on keeps working
tools/ci/ctest_skips.pyreads two shapes out ofbuild/ctest.log. A 4-test probe project run with-j 4prints the same two:and running
ctest_skips.pyon the-j 4log and on the serial log of the same project yields the identical set of findings — including the unbaselined-skip failure (ctest_skips: t_skip SKIPPED and the baseline does not name it …, rc 1). So a new skip is still caught when tests run in parallel.The measurement this PR exists for
This PR's own build is the experiment: old 23m total (Build 7.28m / Test 14.55m) against the new total and Test time, reported here when it finishes. If any test fails only under
-j 4, I will say which one and fall back to-j 2rather than weakening a test.