Repository navigation
WIP: test(differential): anchor oracle resolution to GNU_BIN (Refs #1478) - #1481
Merged
Merged
Conversation
…resolution (Refs #1478) find_oracle fell back to a bare-name PATH lookup for any command the GNU_BIN tree did not carry, so the host silently answered for it: procps /usr/bin/kill graded the util-linux kill corpus, and in other lookup forms a bash builtin token could stand in for a binary. - With GNU_BIN set, a command now resolves only inside the tree. - Host fallback survives only for commands named in the new oracle-host-allowlist.txt (what coreutils does not build: util-linux, diffutils, findutils, ...), and every use warns on stderr. Host lookup uses type -P, which can never return a builtin, function or alias token. GNU_BIN unset remains as an explicitly warned ungoverned host mode. - Before any case runs, the runner resolves every selected command once and prints the table (command, binary, source) into the report header; run_case consumes that table, so the program answering a case is always the one on record. Unresolvable commands SKIP as before, now with a warning naming the reason. - find_timeout and absolute_command get the same treatment; the workflow comment and tests README are updated to match. CI invocation is unchanged; with the baseline job's GNU_BIN=/usr/bin every present command anchors exactly where it anchored before.
caomengxuan666
marked this pull request as ready for review
November 1, 2026 07:49
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.
Refs #1478
Problem
tests/differential/runner.shresolved the GNU oracle by bare name wheneverGNU_BINlacked a command:find_oraclefell back tocommand -v, so the host silently answered — procps/usr/bin/killgraded the util-linux kill corpus (11/12 cases in the #1468 baseline run), BSD ncal answers forcal, and in non-exec lookup forms a bash builtin token could stand in for a binary. No warning, no record: the report never said which program produced the oracle side.Fix (mechanism, not a kill special case)
GNU_BINset, a command resolves only inside that tree (plain or.exe).tests/differential/oracle-host-allowlist.txt— the audited set coreutils does not build (util-linux, diffutils, findutils, grep/sed, gettext/glibc helpers, file/which/xxd/unix2dos). Every use warns on stderr.GNU_BINunset remains available as an explicitly warned ungoverned host mode for ad-hoc runs.type -Pinstead ofcommand -vfor host lookup: it returns executable files only, never a builtin/function/alias token for echo/printf/test/kill.run_caseconsumes that table. Unresolvable commands still SKIP, now with a warning that distinguishes 'not allowlisted' from 'allowlisted but no host binary'.find_timeoutandabsolute_commandget the same treatment. Invocation interface unchanged (same flags/env); the baseline job'sGNU_BIN=/usr/binanchors every present command exactly where it anchored before, and the workflow comment is updated to describe the new semantics.Local validation (Linux host; product build is Windows-only and untouched)
Synthetic oracle trees + host decoys + subject stubs, driven through the runner itself:
killfirst in PATH: kill/echo/printf/test/cal all resolvegnu-binfrom the tree, 5/5 PASS.ls(coreutils, not allowlisted) ismissing→ SKIP — the old runner silently graded it against the PATH decoy (OUT_DIFF, no warning, no record).GNU_BINunset: global + per-command host warnings; table records sourcehost.--only kill,GNU_BIN=/usr/bin: table showskill → /usr/bin/kill (gnu-bin)— the distro identity is now on record in every report.Notes
killidentity question itself (procps vs util-linux inside a distroGNU_BIN=/usr/bin) is not changed by anchoring; what changes is that it is now visible in every report instead of silent. The WIP: util-linux family oracle audit W7 — cal/col/column/hexdump/rev/logger/whereis/getopt/more/look/kill/renice/tzset/getconf (Refs #1462) #1468 kill cases stay whitelisted/provisional until a util-linux build is pointed atGNU_BIN.