Skip to content

test(common): make issue2197 wait_bounded pins Windows-portable - #3877

Merged
caomengxuan666 merged 1 commit into
masterfrom
fix/3568-issue2197-wait-bounded-windows
Nov 17, 2026
Merged

caomengxuan666 merged 1 commit into
masterfrom
fix/3568-issue2197-wait-bounded-windows

Conversation

@caomengxuan666

Copy link
Copy Markdown
Member

Refs #3568

Summary

  • tests/common/mod.rs 的两个 issue2197_wait_bounded_* pin 原来依赖 sleep 经 PATH 解析;sleep 在 rubash 里只是 pipeline-stage 快路径,不是常规 builtin,minimal_path()(System32 + Git usr/bin)在无 Git 的 Windows 机器上解析不到 → 假子进程 127 / 孤儿管道不成立(X299 与本机同症复现)。
  • Windows 面换成不依赖外部 sleep 的等价形状:孤儿 pin 用 System32 必有的 ping -n 10 127.0.0.1 &(约 9s 自行退出);never-exiting pin 用纯 builtin while :; do :; done(wait_bounded kill 时随进程消亡,无残留)。unix 面保持 sleep 120 原样。

Test plan

  • cargo test --test issue2883_read_prompt_carrier_regressions:修复前 0/2(Some(0)/Some(127)),修复后 2/2 绿(Windows 本机,minimal_path 环境)
  • rustfmt --check tests/common/mod.rs 干净
  • Linux CI 双侧回归(unix 分支未改,预期不变)

Generated with Devin

@caomengxuan666

Copy link
Copy Markdown
Member Author

【WIN-AGENT-AUDIT】CI 归因补充(#3877 head 4ed241c)

  • Compatibility CLI tests 红:c_command_keeps_named_coproc_output_fds_distinct(tests/cli_tests.rs:175,断言 first:second 得 first:)。
  • 归因:flake/基线,非本 PR。依据:(1) 本 PR 仅改 tests/common/mod.rs 两个 pin 脚本字符串,cli_tests 不 mod common,该测试二进制不含本改动;(2) 同一测试在另一分支 CI run 44158468302 同样 FAILED(跨分支复现);(3) master a1f9718 同 job 两次 CI 绿,符合间歇性 flake 特征(coproc 双 fd 读时序竞争)。
  • 其余 job 仍在跑;Regression pin stem census 出结果后需确认两 pin 在 Linux 侧保持绿(unix 分支脚本未改,预期不变)。

@caomengxuan666
caomengxuan666 marked this pull request as ready for review November 17, 2026 23:39
@caomengxuan666
caomengxuan666 merged commit 1eb4fac into master Nov 17, 2026
9 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant