You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This failure appears to be due to close being too early.
Some investigations
write triggers the following processes
(1) pty write
(2) pty read
(3) vterm write
(4) vterm read
(5) pty write if (4), and go to (2)
(3)..(5) are synchronous process.
only (2) is asynchronous and undetermined process.
The combinations of processes that cause problems are as follows
write then close
close in spite of remaining undelivered data will lost following data.
write then write
Potentially performing (1) while there is undelivered data will result in mis-ordering of data.
Proposed Solution
If it can be assumed that there is always data available to be read from the pty after a write to the pty, it is possible to wait longer for data and keep the processing order correct.
The text was updated successfully, but these errors were encountered:
After closing, yamatanooroti can't wait for a long time not to make test slow.
We can now perform assert_screen several times before close, and I think the test is not good. #24 will fix the test flakyness.
If someone wants to close input before assertion, Yamatanooroti needs to implement #15.
mis-ordering
Considering running TUI program through SSH(or through some other network with delay), mis-ordering always happens. Reline implements mechanism to read mis-ordered cursor position response.
I think the chance of mis-ordering is low enough. To decrease mis-ordering, I think #16 is what we need.
Closed PR #23 mainly addresses closing issue. #24 resolves this.
Keeping ordering is side effect. It can reduce unpredictability I thought.
But mis-ordering is something that can happen, keeping ordering is not necessary.
Testing with mis-ordering may be necessary, but that should be an another issue.
TestVTerm somtime fails like:
https://github.com/ruby/yamatanooroti/actions/runs/11032616108/job/30641945856?pr=12
This failure appears to be due to close being too early.
Some investigations
write triggers the following processes
(1) pty write
(2) pty read
(3) vterm write
(4) vterm read
(5) pty write if (4), and go to (2)
(3)..(5) are synchronous process.
only (2) is asynchronous and undetermined process.
The combinations of processes that cause problems are as follows
close in spite of remaining undelivered data will lost following data.
Potentially performing (1) while there is undelivered data will result in mis-ordering of data.
Proposed Solution
If it can be assumed that there is always data available to be read from the pty after a write to the pty, it is possible to wait longer for data and keep the processing order correct.
The text was updated successfully, but these errors were encountered: