open-standards/jouleclaw/jouleclaw-rs/crates/jouleclaw-energy/tests
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Transaction Science b2e75b9f37 jouleclaw-energy's process-counter test kills and reaps its busy child, however the test ends
tests/process_cpu.rs (macOS) starts a child that spins `while :; do :; done` and kills it
inside the window it meters. Between its spawn and that kill each energy read asserts; a read
that failed there unwound past a bare std::process::Child, which is not killed when it is
dropped, and left the child spinning a core once the test binary had ended, one more for each
failed run. The child is now held, as it is spawned, in a `Running` that kills it and reaps it
when it is dropped, waiting up to 10 s (as wai-quantum-service's tests hold theirs, 04d19cfd8);
the test still kills and reaps it inside the window, so what it meters is unchanged.

Planted fault, on the old-prod Mac Studio (macOS, M3 Ultra): the test made to panic right
after its first read of the child's counter, with the child running, run alone in a session and
process group of its own (POSIX setsid; macOS has no setsid command, and its ps and pgrep
cannot select by session, so the group was listed), 3 s after cargo ended. At main the group
held the busy child (/bin/sh -c while :; do :; done, 3 s old), which was then killed by its
group; with the guard it held nothing.

Gates, on the old-prod Mac Studio: cargo test --locked -p jouleclaw-energy passed (76 tests in
9 binaries) and with --features ioreport (144 in 9), each leaving nothing in its process group;
cargo clippy --locked --all-targets --no-deps -p jouleclaw-energy -- -D warnings is clean in
the default build and with ioreport. The light checks pass.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-10 12:35:59 -05:00
..
ioreport_probe_once_per_process.rs jouleclaw-energy: one tested composition is the host status, and only Live opens a counter 2026-09-30 18:30:41 -04:00
nvml_hardware.rs jouleclaw-energy: clippy-clean under rapl and nvml on Linux 2026-11-05 10:21:43 -05:00
process_cpu.rs jouleclaw-energy's process-counter test kills and reaps its busy child, however the test ends 2026-11-10 12:35:59 -05:00
process_cpu_short_span.rs jouleclaw-energy: a process reads itself only once the reading thread has left its core 2026-10-12 20:50:52 -04:00
process_gpu.rs jouleclaw-energy test: the rail check's 120 W gap cap, measured beside a heavy co-tenant 2026-11-04 08:13:11 -05:00
rapl_hardware.rs jouleclaw-energy: RAPL MSR domains are per die on Intel, per package on AMD; die zones are packages 2026-11-04 21:20:28 -05:00
vendor_energy_conformance.rs jouleclaw: vendor-energy measurement protocol + honestly-empty fixtures 2026-06-04 03:43:22 -04:00