ソースを参照

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 年 前
コミット
da5b818180
1 ファイル変更4 行追加2 行削除
  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 {
 func protocolNotSupported(err error) bool {
 	switch err := err.(type) {
 	switch err := err.(type) {
 	case syscall.Errno:
 	case syscall.Errno:
-		if err == syscall.EPROTONOSUPPORT {
+		switch err {
+		case syscall.EPROTONOSUPPORT, syscall.ENOPROTOOPT:
 			return true
 			return true
 		}
 		}
 	case *os.SyscallError:
 	case *os.SyscallError:
 		switch err := err.Err.(type) {
 		switch err := err.Err.(type) {
 		case syscall.Errno:
 		case syscall.Errno:
-			if err == syscall.EPROTONOSUPPORT {
+			switch err {
+			case syscall.EPROTONOSUPPORT, syscall.ENOPROTOOPT:
 				return true
 				return true
 			}
 			}
 		}
 		}