Repository navigation
批量修复 QC round 2 立案的 5 个 rust-tests 兼容问题 (#1607-#1611) - #1618
Merged
Merged
Conversation
The behavioral fix (per-component link-name check instead of a
contains("dang") substring assert, which matched the canon-dang-*
scratch dir itself) already landed on master via 2ad7639
(PR #1615); the issue stayed open because nothing referenced it.
Pins the tracker link on the owning test. No behavior change.
The behavioral fix (TARGET keeps the operand text verbatim through normalize_operand + the '/'->'\' reparse fold — identity for relative spellings, drive-dialect fold for /c/x — while the LINK operand keeps api_path) already landed via 2ad7639 + 305b056 (PR #1615); pins the tracker link on the owning function. No behavior change. The -r path (ln.rs relative_target -> create_symlink) is covered by the ln relative_requires_symbolic -rs probe, which runs privileged on CI rust-tests (green on master).
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.
背景(重要)
五个 issue(#1607–#1611,QC round 2 由 rust-tests job 首跑报出)的行为修复已随 PR #1615(rust2/regex-fastpath,commits
2ad76397+305b056d)于 2026-11-13 合入 master;因该 PR 标题/正文只提了 #1602,五个 issue 一直无人引用、保持 OPEN。本 PR 做三件事:逐 issue 复核
canon::dangling_tests断言!r.contains("dang"),而 scratch 目录自身名canon-dang-*,symlink-capable 主机上任何绝对路径都自败!r.split(['\\','/']).any(== "dang")(canon.rs:310)(#1607)chown::tests::from_filter硬编码--from Administrators作"不匹配"用例;提权进程创建的文件 owner 就是 Administrators 组,于是匹配、-v打印Users,否则Administrators;chown.rs:1053)(#1608)fs_win::create_symlink把 TARGET 也过api_path(ctx, target)(ctx.cwd.join),相对 target 被绝对化进 reparse point;GNU symlink(2) 存原文normalize_operand(identity 于相对/已原生拼写 → 保原文;/c/x盘符方言折叠 →C:\x,ctestln_symlink_drive_dialect_lands_on_operand_drive)+'/'→'\',LINK 侧保留api_path(fs_win.rs:688;2ad76397+305b056d)(#1609);-r路径复核:ln.rsrelative_target→create_symlink,相对结果为 identity,保原文,ln.rs:937-rs -v探针在 CI(有 symlink 特权)实测绿nice::tests::no_command_prints_niceness假设进程 NORMAL(印 0);GH runner 以 BELOW_NORMAL 拉起、子进程继承(runner-images#7663),产品如实印 10SetPriorityClass(GetCurrentProcess(), NORMAL_PRIORITY_CLASS)再断言(nice.rs:408)(#1610)%s报 0;GNU 报目标名字节长(#1310 契约);file_meta的 CreateFileW 主路径缺 lstat 修正(find_first_meta fallback 已有)lstat && is_symlink时meta.size = read_link 目标名 len(fs_win.rs:455)(#1611)stat::tests::symlink_lstat实建 reparse point)验证
cargo test --locked -p winux-cmds --lib702 passed / 0 failed,5 个点名测试单独跑全绿;cargo fmt --check干净。build-windows x64 defaultctest job,不属本批)。CreateSymbolicLinkW→ ERROR_PRIVILEGE_NOT_HELD),依赖 symlink 的用例本地 soft-skip,故 symlink 类([ln] create_symlink absolutizes the link TARGET #1609/[stat] %s for a symlink reports 0 instead of the target-name length #1611)以 CI rust-tests 为准。Fixes #1607, Fixes #1608, Fixes #1609, Fixes #1610, Fixes #1611