Load, concurrency and reliability
An appendix to nifeos/nife:notes/scripts.md, the front door to script/. It holds the full
table rows for the commands that run the suite under load, in parallel, or for a long time. A reader
who only needs to run a command should not have to open it. The directory notes/scripts/ and this
file's stem are provisional names; naming is calef's.
| script | what it does |
|---|---|
script/cpu-matrix |
Run the riscv64 suite against every QEMU CPU model in the matrix (rv64, sifive-u54, rva22s64, rva23s64, thead-c906), because the default rv64 is QEMU's maximalist model and the board is an RV64GC U74. A CI gate. Preflights that -cpu is enforced rather than merely advertised, then runs every model without stopping at the first failure. See notes/cpu-models.md. |
script/repeat-under-load [-n runs] [-s spinners] [-- <script/test args>] |
Run the suite N times with one busy-loop spinner per core, and record what the load actually was: elapsed seconds per run, the one-minute load average sampled every ten seconds (minimum, mean, peak), and how many QEMU processes were up, so a neighboring lane gating on the same laptop is separable from the contention the script manufactures. Milestone 62's acceptance instrument, and the answer to that block's own BUGS line: a flake that fires one run in six is indistinguishable from a fixed one until you have run it many times, so the evidence is a repeat count under load rather than a green run. Load causes false failures, not false passes, which is what makes a green result here conclusive and a red one a lead; the failure text says so, and says not to widen the bound. -s 0 is the quiet control. Not a gate and never in CI: it costs hours by construction. Name provisional. See notes/load-sensitive-assertions.md. |
script/runner-container [-n runs] [--arch A] [--build-only] [--shell] |
Boot the suite over and over inside an approximation of the CI runner, because inbound check (riscv64) has gone red three times on ubuntu-24.04-arm and never once on macOS. An ubuntu 24.04 aarch64 container, running native on an aarch64 laptop so nothing is emulated but the guest, with the emulator built by script/ci-qemu from .qemu-version's pin rather than apt-installed, provisioning by script/bootstrap, and the core count narrowed by affinity rather than by a CFS quota (a quota throttles without changing what nproc says, which is not the runner's shape). The loop is script/repeat-under-load -s 0: no induced load, because both CI observations had a load average near 1 and spinners would be manufacturing a different bug. The tree is mounted read-only and cloned inside, so a fifty-boot run cannot write into a lane's worktree or the machine's rustup links; QEMU cannot leak, because the emulators die with the container. Not a gate and never in CI. Name provisional. See notes/net/the-inbound-check.md for what fifty boots found and what the container does not carry. |
script/soak-test |
Run milestone 219's sustained multicore workload under QEMU and judge it exactly as a board is judged: boot --features soak_test, where the tour ends in a pool of user-mode IPC workers and a five-second heartbeat instead of arch::halt(), and feed the console to the same serial_console recognizer and policy script/board-console points at a real port. Same exit statuses (0 beat throughout, 1 announced a failure, 2 went quiet, 3 QEMU exited early or the workload never started, 4 build or arguments). --arch aarch64|riscv64|x86_64, --for <duration>, --smp <n>. A clean run is a number to compare against, not evidence that the concurrency is correct, and the script says so on every green run. Named soak until calef ratified soak-test on 2026-09-14 (milestone 297); the cargo feature and the console markers moved with it. See notes/soak.md. |
script/job-mix [--arch A] [--smp N] [--for D] [--quiet-after D] [--log F] |
Rehearse milestone 168's multi-tasking workload sweep under QEMU: boot --features job_mix, where the tour ends in a pool of EL0 tasks swept through a heterogeneous job mix instead of arch::halt(), log every byte, and tear the emulator down when it prints job-mix: done. The judging is crates/serial_console's since milestone 324 part 2, the same recognizer script/soak-test and script/board-console use, so the exit statuses are theirs: 0 the sweep completed, 1 the kernel refused to start it or announced any other failure, 2 it spoke and then went quiet, which is a wedged sweep, 3 the time ran out with job-mix: done unreached, 4 build or arguments. What stood there before was a second reader with no timeout at all, so a wedge hung the command forever. A sweep has no wall-clock heartbeat, so --quiet-after defaults to sixty seconds against a 4.0-second slowest subrun (it was 2.6 until milestone 168 took twenty-one repeats of a seven-kind mix) and --quiet-after 0 is the escape for a very slow board. This is the rehearsal and not the measurement: the milestone's gate is HARDWARE, TCG models no cache, and the number design/decisions/0096-process-kernel-or-event-kernel.md is waiting for is taken on radon by notes/job-mix.md's procedure. No --check and no committed baseline, deliberately: a sweep whose subject is scheduling under contention is not deterministic on any accelerator this tree has. Name provisional. See notes/job-mix.md. |
script/interleaving-check |
The hand-rolled atomic protocols under loom, which searches every thread interleaving and every reordering the C11 model permits (milestone 80). The one gate that can falsify CLAUDE.md's fourth rule: Kani's harnesses are single-threaded, Miri runs one interleaving, and QEMU's TCG explores almost none of the orderings aarch64 and riscv64 allow. Covers crates/steal_request (the work-steal handshake) and crates/clock_contract (the clock page's seqlock, where it found a real torn read on its first run). loom is a [target.'cfg(loom)'.dependencies] entry, so no ordinary build resolves or compiles it. Under a second warm; extra args go to cargo test. Not in test or gates; see the note for why. See notes/interleaving.md. |
script/ci-log-baseline |
Per-check attribution for failed CI jobs, mined before the logs expire. A job conclusion alone says a job failed, not which of its sub-checks did; the log's last ==> marker usually does. --update fetches anything new since the last captured date and appends to notes/project-metrics/ci-log-baseline.csv, one row per failed job among the five job types whose logs distinguish more than one check (lint, which is script/lint and was named clippy before 2026-10-08; supply chain; cpu matrix; verify (Kani proofs); and bench's icount tripwire, matched on its own CHECK FAIL line rather than a marker). --report reads the record back; --verify N re-fetches N existing rows live to catch drift. A job whose log has expired is recorded as unattributable: log expired, never dropped. Names provisional. See ci-log-baseline.md. |
What this file's numbers cite
Glossed here by the per-file rule. Each gloss is the record's own title.
- milestone 62 (Tests that assert on time: make a red run mean something)
- milestone 80 (Loom: the hand-rolled atomic protocols, model-checked)
- milestone 168 (A multi-tasking workload benchmark: the number that would decide the event-kernel question)
- milestone 219 (The boot tour ends and the kernel halts, so there is nothing to soak)
- milestone 297 (
soakbecomessoak-test) - milestone 324 (The bench console cannot speak to any of the three boards)