Browse Source

go.net/ipv4: ignore ENOPROTOOPT in ancillary data socket option tests

LGTM=iant
R=iant
CC=golang-codereviews
https://golang.org/cl/154260043
Mikio Hara 11 years ago
parent
commit
da5b818180
1 changed files with 4 additions and 2 deletions
  1. 4 2
      ipv4/error_posix_test.go

+ 4 - 2
ipv4/error_posix_test.go

@@ -14,13 +14,15 @@ import (
 func protocolNotSupported(err error) bool {
 	switch err := err.(type) {
 	case syscall.Errno:
-		if err == syscall.EPROTONOSUPPORT {
+		switch err {
+		case syscall.EPROTONOSUPPORT, syscall.ENOPROTOOPT:
 			return true
 		}
 	case *os.SyscallError:
 		switch err := err.Err.(type) {
 		case syscall.Errno:
-			if err == syscall.EPROTONOSUPPORT {
+			switch err {
+			case syscall.EPROTONOSUPPORT, syscall.ENOPROTOOPT:
 				return true
 			}
 		}