test(xtask): compare verify-redo warnings per stream - #7233
Merged
oferchen merged 1 commit intoAug 6, 2026
Conversation
The verify-redo check read only stderr, so a cell where oc emits the failed-verification line on stdout compared [] against upstream's [] and passed. Measured against rsync 3.4.4: on daemon pull oc writes the line to stdout at every verbosity while upstream is silent by default and writes to stderr under -v, so that cell passed assertion 3 vacuously and only failed later on the delta split. Capture the lines per stream and compare stdout and stderr separately. Upstream gates the line behind INFO_GTE(NAME, 1) (receiver.c:1072) and rwrite() routes FWARNING to stderr (log.c:314), so the oracle is: absent from both streams by default, present on stderr alone under -v. The failure message now names the stream the line landed on - the text is identical either way, so a bare "not found" points at a missing emit when the fault is a misrouted one.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #7232 (base
test/xtask-verify-redo-check). Draft until #7232 lands.The hole
warning_lines()was only ever called with the two stderr captures:Assertion 3 therefore could not see a line on stdout. Measured on macOS against
rsync 3.4.4, using the check's own fixture and flags, with stdout and stderr captured to separate files:-vWARNING: payload.bin ...WARNING: <absolute path>/payload.bin ...-vWARNING: payload.bin ...WARNING: <absolute path>/payload.bin ...-vWARNING: payload.bin ...WARNING: payload.bin ...The daemon-pull default cell is the vacuous pass: upstream prints nothing anywhere, oc prints an ungated line carrying an absolute path on stdout, and comparing
[] == []accepted it. Today a later assertion catches that cell on the delta split, so the divergence is merely misattributed; once the in-flight delta fixes land it would go green while still diverging. The-vcell was worse than useless - it reportedoc [] != upstream [...], which reads as "oc printed nothing" when oc printed on the wrong stream.The ssh cells are not in the table: no sshd answers on localhost:22 here, so the check skips them. Only the cells where oc is the receiver exercise oc's own emit; on daemon push the receiver is the upstream peer.
The fix
Capture per stream and compare stdout and stderr separately. The oracle becomes a pair:
receiver.c:1072gates the line behindINFO_GTE(NAME, 1)).-v: present on stderr, absent from stdout (upstream:rwrite()mapsFWARNINGtof = stderr,log.c:314, and forwards it asMSG_WARNINGwhenam_server).The failure message names the stream, because the text is identical wherever it lands. Nothing else in the check changes: the oracle values (2 transfers, Literal 205,300, Matched 101,900) were re-measured against live upstream and are untouched, and no assertion was relaxed.
Before / after
cargo xtask validate --transport local --transport daemon, same master oc binary both runs.Before:
After:
The daemon-pull-default cell moving from a delta-split failure to a named stream failure is the proof: assertion 3 now fires where it previously passed on nothing. These cells are expected to stay red until the emit-site and delta fixes land.
Verification
cargo fmt --all -- --checkcleancargo clippy --locked --workspace --all-targets --all-features --no-deps -- -D warningscleancargo nextest run -p xtask --all-features -E 'test(verify_redo)'- 10 passed