mirror of
https://github.com/creack/pty.git
synced 2026-03-31 02:27:08 +09:00
Revert #167 to avoid race on Linux.
This commit is contained in:
7
.github/workflows/test.yml
vendored
7
.github/workflows/test.yml
vendored
@@ -51,5 +51,10 @@ jobs:
|
||||
# Skip tests for 1.6 as we use modern Go.
|
||||
# If the main lib builds and tests pass on other versions, we are good.
|
||||
- if: ${{ matrix.go_version != '1.6.x' }}
|
||||
name: Test
|
||||
name: Single Test
|
||||
run: go test -v
|
||||
|
||||
# Run the tests again 100 times without verbose.
|
||||
- if: ${{ matrix.go_version != '1.6.x' }}
|
||||
name: Many Tests
|
||||
run: go test -count=100 -timeout=10s
|
||||
|
||||
@@ -28,6 +28,8 @@ var glTestFdLock sync.Mutex
|
||||
//
|
||||
//nolint:paralleltest // Potential in (*os.File).Fd().
|
||||
func TestReadDeadline(t *testing.T) {
|
||||
t.Skip("Disabling while investigating race.")
|
||||
|
||||
ptmx, success := prepare(t)
|
||||
|
||||
if err := ptmx.SetDeadline(time.Now().Add(timeout / 10)); err != nil {
|
||||
@@ -57,6 +59,8 @@ func TestReadDeadline(t *testing.T) {
|
||||
//
|
||||
//nolint:paralleltest // Potential in (*os.File).Fd().
|
||||
func TestReadClose(t *testing.T) {
|
||||
t.Skip("Disabling while investigating race.")
|
||||
|
||||
ptmx, success := prepare(t)
|
||||
|
||||
go func() {
|
||||
|
||||
5
ioctl.go
5
ioctl.go
@@ -6,6 +6,11 @@ package pty
|
||||
import "os"
|
||||
|
||||
func ioctl(f *os.File, cmd, ptr uintptr) error {
|
||||
return ioctlInner(f.Fd(), cmd, ptr) // Fall back to blocking io.
|
||||
}
|
||||
|
||||
// NOTE: Unused. Keeping for reference.
|
||||
func ioctlNonblock(f *os.File, cmd, ptr uintptr) error {
|
||||
sc, e := f.SyscallConn()
|
||||
if e != nil {
|
||||
return ioctlInner(f.Fd(), cmd, ptr) // Fall back to blocking io (old behavior).
|
||||
|
||||
Reference in New Issue
Block a user