From 285bb1047f23759911d7bd619556cdab556b76dc Mon Sep 17 00:00:00 2001 From: Joseph Ferano Date: Fri, 25 Sep 2026 22:24:08 +0700 Subject: [PATCH] The half-write test reports a session that closes under a question as a failure instead of ending test_dev --- TODO.org | 6 ------ test/test_dev.ml | 8 +++++++- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/TODO.org b/TODO.org index 4d9a7af9..c1920e68 100644 --- a/TODO.org +++ b/TODO.org @@ -1789,12 +1789,6 @@ crashed session keeping its directory. The fork pool is drained before anything reads the failure count, and a nonzero count is an exit status. A red row used to be able to print and pass. -** TODO test_dev dies on Wire.Closed after the half-write abort -Intermittent, on an unmodified tree too: the =--llvm= half-write daemon in -=test_dev.ml='s =half_written= sometimes exits before it replies to =abort=, and -=request= raises =Wire.Closed= uncaught, so test_dev ends with a fatal, no =FAIL= -line and every later row unrun. - ** WAIT An x86 dev session's read of a dyn global after an allocating thunk failed once WAIT on a recurrence; the test now prints the failing read's own reply. The one failure's message came from a second read, which said "kept"; the failing diff --git a/test/test_dev.ml b/test/test_dev.ml index 836fdc09..3dd86d92 100644 --- a/test/test_dev.ml +++ b/test/test_dev.ml @@ -7034,6 +7034,9 @@ let () = :: _); _ } -> n | _ -> "" in + (* A daemon that goes away mid-question is a failure named here, not + a [Wire.Closed] that ends the binary with every later row unrun. *) + (try if not (await (fun () -> inside () = "in-local")) then fail "%s: the program never stopped inside the local's assignment" flag else begin @@ -7072,7 +7075,10 @@ let () = (String.concat ", " (List.map (fun (n, ty, v) -> n ^ " " ^ ty ^ " = " ^ v) got)) end - end; + end + with (Wire.Closed | Unix.Unix_error _) as e -> + fail "%s: the half-write session ended under a question: %s" flag + (Printexc.to_string e)); (* No [close]: the program is stopped with nothing left to resume into, so the way out is the abort, and the daemon follows the program. An abort is refused by a program that is *running*, which is what a