Elffuss BraidHub

utopia-ia/elffuss-braid public

Docs: a watchdog that stops ends verify with an error, not a failed run

The README and verify --help said that when the watchdog cannot start,
or stops, "the run fails". A failed run is run again and then counts
towards red, bisecting and a revert, with exit status 4. What verify
does is end there with outcome error and exit status 1, and run no more
tests. Both now say so, and so does the comment on Tester::wait.
Changeset0ccca9aebb87da9fee4971586c878cde1ab3be1df558e72363d9d1ed5175aa87
AuthorKikoCis <KikoCis@users.noreply.github.com> · 2026-10-21 19:50 +02:00
CommitterKikoCis <KikoCis@users.noreply.github.com> · 2026-10-21 19:50 +02:00
Parents2c3d4a7c741b

Browse the files at this changeset

2 files changed

modified README.md +5 −4
@@ -350,10 +350,11 @@
350350 (10 minutes by default), the group is killed, with whatever it started
351351 that is still in it; a process that left the group, as a daemon does, is
352352 not. A watchdog process, started before the command, kills the group and
353- removes the copy if braid is killed or exits while the tests run, and
354- when the watchdog cannot start, or stops, the run fails rather than go
355- on unwatched. On other systems (Windows is not verified) only the
356- command itself is killed, and nothing watches braid.
353+ removes the copy if braid is killed or exits while the tests run. When
354+ the watchdog cannot start, or stops, verify ends there with an error
355+ (exit status 1) rather than go on unwatched, and runs no more tests. On
356+ other systems (Windows is not verified) only the command itself is
357+ killed, and nothing watches braid.
357358 - **In a container,** run braid under an init such as
358359 [tini](https://github.com/krallin/tini) (`docker run --init`), not as
359360 PID 1: PID 1 gets no default handling of signals, and has to reap the
modified crates/cli/src/verify.rs +8 −7
@@ -115,12 +115,13 @@
115115 times out, the group is killed, and so are processes it started that are
116116 still in it (one that left the group, as a daemon does, is not). A watchdog
117117 process, started before the command, kills the group and removes the
118-directory if braid is killed or exits while the tests run; when the
119-watchdog cannot start, or stops, the run fails. Elsewhere (Windows is not
120-verified) only the command itself is killed, and nothing watches braid. In
121-a container, run braid under an init such as tini (docker run --init), not
122-as PID 1, which gets no default signal handling and must reap the
123-processes others leave behind.
118+directory if braid is killed or exits while the tests run. When the
119+watchdog cannot start, or stops, verify does not go on unwatched: it ends
120+there with an error, exit status 1, and runs no more tests. Elsewhere
121+(Windows is not verified) only the command itself is killed, and nothing
122+watches braid. In a container, run braid under an init such as tini
123+(docker run --init), not as PID 1, which gets no default signal handling
124+and must reap the processes others leave behind.
124125
125126 - The head is the green changeset already: pass, and nothing runs.
126127 - The tests pass: the green ref moves to the head, in an operation of
@@ -531,7 +532,7 @@
531532 /// Waits for the command, at most until the timeout, then kills its
532533 /// group: whatever it left running, or all of it on a timeout. Should
533534 /// the watchdog stop meanwhile, or the wait fail, the group is killed
534- /// too, and the run fails.
535+ /// too, and verify ends with an error.
535536 fn wait(&self, child: &mut Child, watchdog: &mut Watchdog) -> Result<RunEnd> {
536537 let deadline = Instant::now() + self.timeout;
537538 loop {