From: Bryan C. Mills Date: Wed, 19 Apr 2023 13:56:45 +0000 (-0400) Subject: os: check for ErrNotExist instead of ErrExist in TestNonPollable X-Git-Tag: go1.21rc1~848 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=8c2ff88c61630c566ce1346d6d6eff973e6736d7;p=gostls13.git os: check for ErrNotExist instead of ErrExist in TestNonPollable An apparent typo in CL 484837 caused the test to check for ErrExist instead of ErrNotExist when opening /dev/net/tun for read. That causes the test to fail on platforms where /dev/net/ton does not exist, such as on the darwin-amd64-longtest builder. Updates #59545. Change-Id: I9402ce0dba11ab459674e8358ae9a8b97eabc8d2 Reviewed-on: https://go-review.googlesource.com/c/go/+/486255 Run-TryBot: Bryan Mills Auto-Submit: Bryan Mills Commit-Queue: Bryan Mills Reviewed-by: Than McIntosh TryBot-Result: Gopher Robot --- diff --git a/src/os/fifo_test.go b/src/os/fifo_test.go index 7a6acce1af..867c294f5e 100644 --- a/src/os/fifo_test.go +++ b/src/os/fifo_test.go @@ -79,7 +79,7 @@ func TestNonPollable(t *testing.T) { f, err := os.OpenFile(nonPollable, os.O_RDWR, 0) if err != nil { - if errors.Is(err, fs.ErrExist) || errors.Is(err, fs.ErrPermission) || testenv.SyscallIsNotSupported(err) { + if errors.Is(err, fs.ErrNotExist) || errors.Is(err, fs.ErrPermission) || testenv.SyscallIsNotSupported(err) { t.Skipf("can't open %q: %v", nonPollable, err) } t.Fatal(err)