use correct error code to handle "permission denied" error

This commit is contained in:
Sauci
2020-11-26 03:05:04 -08:00
parent c55537cdff
commit 95f9714d84

View File

@@ -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")