mirror of
https://github.com/creack/pty.git
synced 2026-03-31 18:47:10 +09:00
re-enable non-blocking tests
This commit is contained in:
11
io_test.go
11
io_test.go
@@ -9,6 +9,7 @@ import (
|
||||
"os"
|
||||
"runtime"
|
||||
"sync"
|
||||
"syscall"
|
||||
"testing"
|
||||
"time"
|
||||
)
|
||||
@@ -28,9 +29,10 @@ 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 := syscall.SetNonblock(int(ptmx.Fd()), true); err != nil {
|
||||
t.Fatalf("Error: set non block: %s", err)
|
||||
}
|
||||
|
||||
if err := ptmx.SetDeadline(time.Now().Add(timeout / 10)); err != nil {
|
||||
if errors.Is(err, os.ErrNoDeadline) {
|
||||
@@ -59,9 +61,10 @@ 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)
|
||||
if err := syscall.SetNonblock(int(ptmx.Fd()), true); err != nil {
|
||||
t.Fatalf("Error: set non block: %s", err)
|
||||
}
|
||||
|
||||
go func() {
|
||||
time.Sleep(timeout / 10)
|
||||
|
||||
Reference in New Issue
Block a user