Repository navigation
WIP: clear the main x64 baseline of 10 (xargs 7 + find/ln/env) - #1427
Merged
Merged
Conversation
The #1320 change (3b91856) made read_confirmation try CONIN$ first, mirroring GNU's /dev/tty. On Windows a process can own a console nobody attends -- services, CI runners and test harnesses allocate or inherit one while every standard stream is a pipe -- and ReadFile on that console's input queue blocks forever. That is what hangs the four -p unit tests for the full 120s ctest timeout on the x64 CI leg: the harness feeds answers through the stdin pipe, the product never reads it. Use CONIN$ only when this process's own stdout or stderr is attached to a console (positive evidence a user is watching this terminal); otherwise read the answer from stdin, the convention the cp/ln/rm and find -ok prompts already use in this tree. The loud EOF failure from #1320 is unchanged: a stdin already consumed as the item source fails the read at EOF and aborts with exit code 1 instead of silently skipping every command.
xargs_max_chars_splits_batches (-s 21) and xargs_delimiter_does_not_force_exit_if_exceeded (-s 22) were calibrated to the pre-#1323 joined-string length. #1387 moved the product to GNU's accounting -- every argv entry counts len+1, verified against local GNU findutils (echo three fits -s 11, fails -s 10) -- under which 'three' alone is 22 and the -d tail item 'gamma\n' (the newline is retained in -d mode, as GNU retains it) is 23. At the old constants the GNU-faithful outcome is the cannot-fit error the CI log shows, so the constants move by the same one byte; every assertion is unchanged.
The second half of xargs_verbose_quotes_special_args_1322 fed the input a'b' through the default parser and expected the -t rendering "a'b". In the default input syntax ' is a grouping quote: GNU parses a'b' to the item ab (verified locally: GNU -t prints 'echo ab'), so no argument ever contains the quote and the #1322 double-quote rendering can never trigger. Feed the item through -0, the verbatim channel -- GNU -t prints 'echo "a'b"' for it -- keeping the assertion and its #1322 intent at full strength.
issue_1309_ls_suppresses_default_print_and_has_all_fields failed only at the substring check: stdout must not contain './a.txt\n'. But the -ls line itself ends with the path (find.cpp prints ls fields + path_display + '\n'), so GNU's own correct output -- one line, 11 fields, ending in './a.txt' -- contains exactly that substring as its tail; the newline-count and field assertions of the same test all pass on the product's output. The assertion as written is unsatisfiable by any correct implementation. Assert the intended property instead: no line consists of the bare path alone, which together with the single-newline and 11-field checks pins the leaked-default-print shape at the same strength. No product change: the -ls suppression added for #1309 works.
issue1367_dangling_destination_interactive_prompts: the 'n' run passed, but after a 'y' answer the run still exited 1 with the link unchanged. The destination-handling cascade never recorded the prompt's approval: with no -b and no -f, an approved run fell into the 'no force, no backup, no interactive' File exists branch. Track the affirmative answer and route it through the same remove_existing path -f uses, as GNU does (an interactive yes is a removal approval). Backup still takes precedence when -b is given; the decline path is unchanged.
env_wrapped_command_version_is_not_intercepted asserted the child is this package's echo, but never arranged for it to be: env resolves the wrapped command through PATH alone (GNU execvp semantics; plan_child_launch deliberately does not search the application directory), and the staged bin dir is not on the test process's PATH. On the CI runner the name resolves to Git's coreutils echo instead, whose banner reads 'echo (GNU coreutils)...' -- exit 0, wrong banner, exactly the observed failure. env's own #1303 option boundary is intact (its sibling tests pass); the test's environment was the defect. Lead PATH with ProjectPaths::detect_bin_dir(), the arrangement childproc's own identity-sensitive tests use. Assertions unchanged.
caomengxuan666
marked this pull request as ready for review
October 28, 2026 05:36
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.
What
Clears the main x64 baseline of 10 (winx-x64 verdict: the red is main's own, not any PR's). First CI round on this branch: 7 xargs items Passed, failure set = exactly the remaining 3, zero new failures. This update adds the find/ln/env fixes, in the mandated order.
xargs (7) — one product fix + three oracle-backed test calibrations
4 interactive timeouts (product):
read_confirmation()triedCONIN$first (#1320, mirroring GNU's/dev/tty). A Windows process can own a console nobody attends — CI runners and test harnesses inherit one while every standard stream is a pipe — andReadFileon it blocks forever; each-ptest burned the full 120s ctest timeout twice per run. Fix:CONIN$is used only when this process's own stdout or stderr is attached to a console; otherwise the answer comes from stdin, the conventioncp/ln/rmandfind -okalready use here. The loud EOF failure from #1320 is unchanged.3 assertion failures (tests; product matches GNU at the old constants):
-s 21→22and-s 22→23(GNU counts every argv entry len+1 — verified against local GNU findutils boundary sweeps — and-dretains the last item's trailing newline, so the constants were calibrated to the pre-#1323 ruler); the-tquoting test now feeds its single-quote item through-0(in the default input syntax'is a grouping quote that GNU strips, so the item could never contain one — GNU-tfor the-0feed printsecho "a'b", verified locally, and the product quoter was verified verbatim standalone). Every assertion unchanged.find (1) — unsatisfiable assertion corrected
issue_1309_ls_...failed only at the substring check: the-lsline itself ends with the path, so GNU's own correct output contains./a.txt\nas its tail (verified: GNU prints one 11-field line ending in./a.txt; the test's newline-count and field assertions pass on the product's output). The assertion now checks the intended property — no line consists of the bare path alone. No product change; the #1309 suppression works.ln (1) — product fix
After a
yanswer at the-iprompt, the run fell into the "no force, no backup, no interactive" File-exists branch — the cascade never recorded the prompt's approval — so the destination was never replaced (exit 1, link unchanged). The affirmative answer now routes through the sameremove_existingpath-fuses, as GNU does. Decline path unchanged.env (1) — test environment defect
envresolves the wrapped command through PATH alone (deliberate GNU execvp parity inplan_child_launch), and the staged bin dir is not on the test process's PATH, so on the runnerecho.exeresolved to Git's coreutils echo ("echo (GNU coreutils)...") — exit 0, wrong banner. env's #1303 option boundary is intact (sibling tests pass). The test now leads PATH withProjectPaths::detect_bin_dir(), the arrangement childproc's identity-sensitive tests use. Assertions unchanged.Accounting
Target: x64 ctest failure set vs main baseline 10 → 0, zero new failures anywhere. I18N review (per AGENTS.md): no user-visible text added or changed in any commit; no catalog update required.