Repository navigation
docs(touch): record NTFS literal-glob platform deviation and test exemption (issue #1143) - #1167
Merged
Merged
Conversation
This was referenced Oct 13, 2026
caomengxuan666
added a commit
that referenced
this pull request
Oct 13, 2026
…u/sed, CHANGELOG #1167/#1169 (#1178) * fix(seq): batch stdout into 64 KiB chunks + integral to_chars fast path (issue #1173) safePrint issues one WriteFile per call, so per-line emission paid a kernel transition two-three times per line (~30us/line piped; 100k lines ~332ms while GNU needs ~5ms). Lines now assemble into a 64 KiB buffer flushed in large chunks, integral first/increment sequences (default fixed format, precision 0, no --format/-w, |operands| <= 2^52) emit through std::to_chars like GNU seq.c's integer bypass, and the floating path drops the per-line size-query snprintf round trip. 100k lines, release build: seq 332ms -> ~45ms, seq | wc 903ms -> ~45ms (GNU/WSL oracle: 7-10ms; residual is the ~40ms Windows process spawn). Byte stream unchanged: new seq_large_range_buffered_output_matches_gnu_bytes pins 588895 bytes/100000 lines across several flush rounds. * fix(du,sed): POSIX drive-form operands resolve through the shared boundary (issue #1174) du rejected '/d/...' operands with ENOENT while accepting 'D:/...' and sed could not read them either — the L2 self-parse contract (tools resolve POSIX operands themselves) was unevenly applied. Both now route operands through native_path::make_api_path_operand_w/normalize_api_operand, the same boundary grep/wc/head/find already use: - du: traversal operands (and -X exclude files, --files0-from sources) fold '/d/src', '/cygdrive/d/src' and /dev pseudo-paths to their Win32 form; operand line and child entries agree on the resolved forward-slashed spelling (Savannah #13956) while the #1159 trailing-separator collapse and error messages keep the operand text as typed. - sed: input operands (glob patterns included) fold before expansion/open, and with -i the folded path is what gets replaced; -f script files and the r/w/W script-embedded paths resolve the same way. Diagnostics and the '='/F filename display keep the operand text as typed. GNU oracle (WSL coreutils): du -sh /usr -> '8.5G /usr' rc=0. New tests cover the dual forms: du -sh '/d/...' vs 'D:/...', sed -n 1p, sed -i and sed -f through '/d/...' paths. * docs(changelog): record the #1167 ntfs-noise docs round and #1169 spawn resolver in [Unreleased] (issue #1175) #1169 (GNU execvp-style child resolution: PATH-only bare-name search with no cwd/System32 shadowing, POSIX PATH spellings normalized) and #1167 (touch NTFS literal-glob platform deviation documented, test exemption registered) were merged without a CHANGELOG entry. PR #1171's own fixes (#1170/#1168/ #1166) were already recorded at merge time (d4210c7), so no duplicate entry is added for it.
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.
背景
#1143(noise-platform:NTFS 上与 GNU 的噪音差异)的行为修复已由 #1152 合入 main(7d94253):
touch -c 'x*x'对齐 GNU,按缺失文件静默跳过、退出码 0;单元测试覆盖三种场景。本 PR 补齐该 issue 中 b 类(Windows 平台本质差异)项要求的文档化处置:写明理由与测试豁免。逐条判定(对照 WSL GNU bash 5.3.0 + GNU coreutils,2026-10-12 复测)
touch 'x*x'*是 NTFS/Win32 非法文件名字符,该文件不可能存在,无法对齐ls 'x*x'touch -c 'x*x'touch_unmatched_glob_literal_reports_ntfs_error在所有平台断言 Windows 行为并注明理由改动
DOCS/gnu-coreutils/touch.md:新增「平台差异(Windows 特有,issue touch: cannot create a literal-glob filename like 'x*x' (NTFS-illegal character, platform noise) #1143)」小节,写明裸 touch / -c / 派生 ls 三类行为与理由,登记测试豁免。DOCS/gnu-coreutils/COMPATIBILITY_MATRIX.md:「平台差异(Windows 特有,无法完全对齐)」清单新增字面量 glob 文件名条目。验证
scripts/build-with-vs.ps1 -BuildDir build -Target winuxcmd-tests构建通过。touch.*18/18 通过(含 touch: cannot create a literal-glob filename like 'x*x' (NTFS-illegal character, platform noise) #1143 三个用例);全量 2811 测试 2809 通过。grep_r_skips_cross_junction_trees_without_crashing/grep_R_warns_and_terminates_on_junction_cycle(grep_unit_test.cpp:1562/:1591):裸调std::filesystem::create_directory_symlink未做无特权降级(其他用例遇 error 1314 会 SKIP),属环境权限的既有问题,与本次纯文档改动及 touch: cannot create a literal-glob filename like 'x*x' (NTFS-illegal character, platform noise) #1143 无关,建议另开 issue 处理。touch -c 'x*x'rc=0;touch 'x*x'rc=1;ls 'x*x'rc=2,与上表一致。I18N
纯文档改动,不含用户可见的运行时/帮助文本,无需更新 winuxcmd-i18n 目录。
Closes #1143(若维护者认为文档化即可完全关闭;issue 当前已因 #1152 关闭)