diff options
Diffstat (limited to 'libgo/go/net/platform_test.go')
-rw-r--r-- | libgo/go/net/platform_test.go | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/libgo/go/net/platform_test.go b/libgo/go/net/platform_test.go index 8e7d9151dee..7e9ad70d19b 100644 --- a/libgo/go/net/platform_test.go +++ b/libgo/go/net/platform_test.go @@ -7,7 +7,9 @@ package net import ( "internal/testenv" "os" + "os/exec" "runtime" + "strconv" "strings" "testing" ) @@ -35,6 +37,16 @@ func testableNetwork(network string) bool { switch runtime.GOOS { case "android", "nacl", "plan9", "windows": return false + case "aix": + // Unix network isn't properly working on AIX 7.2 with Technical Level < 2 + out, err := exec.Command("oslevel", "-s").Output() + if err != nil { + return false + } + if tl, err := strconv.Atoi(string(out[5:7])); err != nil || tl < 2 { + return false + } + return true } // iOS does not support unix, unixgram. if runtime.GOOS == "darwin" && (runtime.GOARCH == "arm" || runtime.GOARCH == "arm64") { @@ -42,7 +54,7 @@ func testableNetwork(network string) bool { } case "unixpacket": switch runtime.GOOS { - case "android", "darwin", "nacl", "plan9", "windows": + case "aix", "android", "darwin", "nacl", "plan9", "windows": return false case "netbsd": // It passes on amd64 at least. 386 fails (Issue 22927). arm is unknown. |