brokerd tests: a slow fake podman no longer fails the time-limit tests

The fake wrote each argument with its own printf. On a loaded machine
(titan, serving Ornith while the gate runs) the 300 ms limit fired while
`run` was still recording, and the `kill` call's lines landed inside
`run`'s: `a_tool_past_its_time_limit_is_killed_removed_and_failed`
failed about one run in five. The fake now writes each call to a file of
its own and appends it with one `cat` (bash's printf writes line by
line), and the two time-limit tests check the calls other than `run`,
which may be killed before it records itself. Test-only; 20 of 20 runs
pass, and both tests pass with a forced one-second start.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-09-25 16:41:44 -07:00
co-authored by Claude Opus 5.5
parent 7d5c5a8d85
commit 1adce5c9df
3 changed files with 17 additions and 9 deletions
+4 -4
View File
@@ -214,10 +214,10 @@ fn a_tool_past_its_time_limit_is_killed_removed_and_failed() {
assert_eq!(got, failed(TIMED_OUT));
assert!(took >= Duration::from_millis(300), "{took:?}");
assert!(took < Duration::from_secs(5), "{took:?}");
let calls = fake.calls();
assert_eq!(calls.len(), 3, "{calls:?}");
assert_eq!(calls[1], ["kill", "boxmaker-s1-1-0"]);
assert_eq!(calls[2], ["rm", "-f", "boxmaker-s1-1-0"]);
let calls = fake.calls_but_run();
assert_eq!(calls.len(), 2, "{calls:?}");
assert_eq!(calls[0], ["kill", "boxmaker-s1-1-0"]);
assert_eq!(calls[1], ["rm", "-f", "boxmaker-s1-1-0"]);
}
#[test]