From 95f9714d845e2c3c05146f8e4497b0a76d2157e8 Mon Sep 17 00:00:00 2001 From: Sauci Date: Thu, 26 Nov 2020 03:05:04 -0800 Subject: [PATCH] use correct error code to handle "permission denied" error --- unix/syscall_internal_linux_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unix/syscall_internal_linux_test.go b/unix/syscall_internal_linux_test.go index 7d888172..627df52d 100644 --- a/unix/syscall_internal_linux_test.go +++ b/unix/syscall_internal_linux_test.go @@ -232,7 +232,7 @@ func Test_anyToSockaddr(t *testing.T) { t.Skip("socket family/protocol not supported by kernel") } else if err == EAFNOSUPPORT { t.Skip("socket address family not supported by kernel") - } else if err == EPERM { + } else if err == EACCES { // Some platforms might require elevated privileges to perform // actions on sockets. Skip the test in this situation. t.Skip("socket operation not permitted")