The reprint header names a signature, not a count, so it is true on every path
This commit is contained in:
parent
3eb53d0f85
commit
9486bc0ac0
@ -52,8 +52,15 @@ leak into other builds. The channel was the defect, not the cause.
|
|||||||
against `rfailures`, a snapshot of `!failures` at block entry, because `failures` is the whole file's and an
|
against `rfailures`, a snapshot of `!failures` at block entry, because `failures` is the whole file's and an
|
||||||
earlier block's failure is not a reason to reprint this daemon's expected complaints. The path itself would be
|
earlier block's failure is not a reason to reprint this daemon's expected complaints. The path itself would be
|
||||||
useless: `rerr` lives under dune's per-run `TMPDIR`, which is gone before anyone reads the run.
|
useless: `rerr` lives under dune's per-run `TMPDIR`, which is gone before anyone reads the run.
|
||||||
3. **The fixture says so in its own voice**, one line, before the daemon starts. The wording deliberately contains
|
3. **The fixture says so in its own voice**, one line, before the daemon starts, naming the directory it is about
|
||||||
no `error`, `Error` or `FAIL`, because the reader it is written for is scanning for exactly those words.
|
to make read-only so the reader can match it against the linker's own words. The wording deliberately contains no
|
||||||
|
`error`, `Error` or `FAIL`, because the reader it is written for is scanning for exactly those words. The reprint
|
||||||
|
header names that signature rather than a count, because a step that fails *before* either chmod window leaves no
|
||||||
|
deliberate failure in the log at all, and a header promising two of them would be the wrong diagnosis NEXT.md
|
||||||
|
warns about.
|
||||||
|
|
||||||
|
`test/dune` was **not** touched, and neither was anything under `lib/`. The whole change is in `test/test_dev.ml`
|
||||||
|
and this file.
|
||||||
|
|
||||||
## Measured, before and after
|
## Measured, before and after
|
||||||
|
|
||||||
@ -65,10 +72,15 @@ Both from a full `dune test --root .`, exit 0 either way.
|
|||||||
| `clang: error: linker command failed` lines | 2 | **0** |
|
| `clang: error: linker command failed` lines | 2 | **0** |
|
||||||
| a line saying the failure is deliberate | none | **1** |
|
| a line saying the failure is deliberate | none | **1** |
|
||||||
|
|
||||||
The two occurrences in the baseline were at `baseline.log:563` and `:565`, immediately after
|
The "before" row is from a full, uncached `dune test`, which inventoried the whole suite: **exactly two
|
||||||
`flan dev: ... dev-robust.flan ready on ...` — which places them in this block and nowhere else. **The count is
|
occurrences**, both sitting immediately after `flan dev: ... dev-robust.flan ready on ...`, which places them in
|
||||||
exactly two**, so there is no second site elsewhere in the suite quietly doing the same thing; fixing `test_dev.ml`
|
this block and nowhere else. So there is no second site quietly doing the same thing and fixing `test_dev.ml` fixes
|
||||||
fixes all of it.
|
all of it. (The run's log has been deleted rather than left in the tree; the count is the claim, and it is
|
||||||
|
reproducible by reverting the two commits below and running the suite.)
|
||||||
|
|
||||||
|
The "after" row is from a run where dune replayed most targets from cache — cached actions do not reprint their
|
||||||
|
output, so the *suite-wide* zero rests on the baseline's inventory rather than on that run. What the after-run does
|
||||||
|
establish directly is the part that matters: `test_dev` itself reran fresh, and produced none.
|
||||||
|
|
||||||
Two informational lines from this daemon — `flan dev: built dev-robust.flan in 1937ms` and its `ready on` — now go
|
Two informational lines from this daemon — `flan dev: built dev-robust.flan in 1937ms` and its `ready on` — now go
|
||||||
to the log with the rest of its stderr rather than to the terminal. Its siblings still print theirs. That is a small
|
to the log with the rest of its stderr rather than to the terminal. Its siblings still print theirs. That is a small
|
||||||
|
|||||||
@ -2874,10 +2874,12 @@ let () =
|
|||||||
"error" or "FAIL" in the wording: the reader this line is for is
|
"error" or "FAIL" in the wording: the reader this line is for is
|
||||||
scanning for exactly those words. *)
|
scanning for exactly those words. *)
|
||||||
print_endline
|
print_endline
|
||||||
"dev: two builds below are made to fail on purpose — the robustness \
|
(Printf.sprintf
|
||||||
fixture holds its own cache directory read-only, so the linker cannot \
|
"dev: two builds below are made to fail on purpose — the robustness \
|
||||||
write its output there. The compiler's complaints go to a log and are \
|
fixture holds its own cache directory (%s) read-only, so the linker \
|
||||||
reprinted only if a step actually goes wrong.";
|
cannot write its output there. The compiler's complaints go to a \
|
||||||
|
log and are reprinted only if a step actually goes wrong."
|
||||||
|
rcache);
|
||||||
let rpid =
|
let rpid =
|
||||||
Unix.create_process_env flan
|
Unix.create_process_env flan
|
||||||
[| flan; "dev"; "programs/dev-robust.flan"; "-s"; rsock |]
|
[| flan; "dev"; "programs/dev-robust.flan"; "-s"; rsock |]
|
||||||
@ -3055,10 +3057,15 @@ let () =
|
|||||||
(* Its contents rather than its name: [rerr] is under dune's per-run
|
(* Its contents rather than its name: [rerr] is under dune's per-run
|
||||||
TMPDIR, which is gone by the time anyone reads the run. *)
|
TMPDIR, which is gone by the time anyone reads the run. *)
|
||||||
if !failures > rfailures then begin
|
if !failures > rfailures then begin
|
||||||
|
(* True on every path through the block, which the obvious wording is
|
||||||
|
not: a step that fails *before* either chmod window leaves no
|
||||||
|
deliberate failure in the log at all, and a header promising two of
|
||||||
|
them would be a wrong diagnosis — the thing NEXT.md says costs more
|
||||||
|
than no message. So it names the signature rather than a count. *)
|
||||||
print_endline
|
print_endline
|
||||||
"dev: the robustness daemon's stderr follows. Two of the linker \
|
"dev: the robustness daemon's stderr follows. Any linker failure in \
|
||||||
failures in it are the deliberate ones described above; anything \
|
it that names the read-only cache directory above is one of the \
|
||||||
else is not.";
|
deliberate ones; anything else is not.";
|
||||||
match open_in_bin rerr with
|
match open_in_bin rerr with
|
||||||
| ic ->
|
| ic ->
|
||||||
let n = in_channel_length ic in
|
let n = in_channel_length ic in
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user