Add NewDirectIOWithTerminal#2310
Conversation
|
LGTM |
There was a problem hiding this comment.
I think this needs a direct.Wait() or close to fix the race. You can test locally with go test -c -race
|
The tests failed with a data race, but not quite sure I understand what is racing though. Restarted but captured the race stack in this gist https://gist.github.com/dmcgowan/674b2dd6c3dfcce3fe54b565f5ce1ba2 |
|
@dmcgowan io will race if you try to read from the buffer if the process hasn't finished flushing |
Signed-off-by: Evan Hazlett <[email protected]>
a4bf17b to
6b4355d
Compare
|
@dmcgowan thanks for the gist. i've updated to fix the race. thx! |
Codecov Report
@@ Coverage Diff @@
## master #2310 +/- ##
==========================================
- Coverage 45.54% 45.51% -0.03%
==========================================
Files 83 83
Lines 9185 9190 +5
==========================================
Hits 4183 4183
- Misses 4326 4331 +5
Partials 676 676
Continue to review full report at Codecov.
|
|
LGTM |
|
Found this PR introduces a bug. Clients which were calling |
This adds
NewDirectIOWithTerminalas well as a test for PTY (TestContainerPTY) to test that output has control codes.Refs: #2307