From 8c2ff88c61630c566ce1346d6d6eff973e6736d7 Mon Sep 17 00:00:00 2001 From: "Bryan C. Mills" Date: Wed, 19 Apr 2023 09:56:45 -0400 Subject: [PATCH] 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 --- src/os/fifo_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) -- 2.48.1