[vim/vim] tests: Fix flaky Test_terminal_cwd in ConPTY (PR #19036)

1 view
Skip to first unread message

MURAOKA Taro

unread,
Dec 28, 2025, 9:23:17 AM (yesterday) Dec 28
to vim/vim, Subscribed

Problem: tests: Test_terminal_cwd in test_terminal.vim fails flaky in the Windows ConPTY terminal.

Processes that terminate too quickly in the ConPTY terminal cause Vim to miss their final output.

In my environment, the probability of the "cmd /D /c cd" used in Test_terminal_cwd occurring is about 1/4. For a simple statically linked Hello World, the probability of it occurring is about 3/4.

Solution: In ConPTY, the timeout is extended to 1msec when reading a channel associated with a job that is about to finish. This allows Vim to read the last output of a process in a pseudo console.

In investigating this issue, I added comments to explain my understanding of two poorly explained fields in the channel structure.


You can view, comment on, or merge this pull request online at:

  https://github.com/vim/vim/pull/19036

Commit Summary

  • faebf71 tests: Fix flaky Test_terminal_cwd in ConPTY

File Changes

(2 files)

Patch Links:


Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/19036@github.com>

Reply all
Reply to author
Forward
0 new messages