Commit 607147d0 authored by Alex Brainman's avatar Alex Brainman Committed by Brad Fitzpatrick

net: skip some tests on Windows XP

Parts of TestUDPConnSpecificMethods and TestWriteToUDP fail, because
UDPConn.WriteMsgUDP is broken on Windows XP. UDPConn.WriteMsgUDP uses
Windows WSASendMsg API, but that call is not implemented on Windows XP (see
https://msdn.microsoft.com/en-us/library/windows/desktop/ms741692(v=vs.85).aspx
for details)

Update #23072

Change-Id: I4e8f149bc62bd87cd7c199e6832b9ce479af0a3e
Reviewed-on: https://go-review.googlesource.com/83077
Run-TryBot: Alex Brainman <alex.brainman@gmail.com>
Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
parent d038da73
......@@ -8,6 +8,7 @@
package net
import (
"internal/testenv"
"os"
"runtime"
"testing"
......@@ -138,12 +139,16 @@ func TestUDPConnSpecificMethods(t *testing.T) {
if _, _, err := c.ReadFromUDP(rb); err != nil {
t.Fatal(err)
}
if testenv.IsWindowsXP() {
t.Log("skipping broken test on Windows XP (see golang.org/issue/23072)")
} else {
if _, _, err := c.WriteMsgUDP(wb, nil, c.LocalAddr().(*UDPAddr)); err != nil {
condFatalf(t, c.LocalAddr().Network(), "%v", err)
}
if _, _, _, _, err := c.ReadMsgUDP(rb, nil); err != nil {
condFatalf(t, c.LocalAddr().Network(), "%v", err)
}
}
if f, err := c.File(); err != nil {
condFatalf(t, "file+net", "%v", err)
......
......@@ -163,6 +163,11 @@ func testWriteToConn(t *testing.T, raddr string) {
switch runtime.GOOS {
case "nacl": // see golang.org/issue/9252
t.Skipf("not implemented yet on %s", runtime.GOOS)
case "windows":
if testenv.IsWindowsXP() {
t.Log("skipping broken test on Windows XP (see golang.org/issue/23072)")
return
}
default:
if err != nil {
t.Fatal(err)
......@@ -206,6 +211,11 @@ func testWriteToPacketConn(t *testing.T, raddr string) {
switch runtime.GOOS {
case "nacl": // see golang.org/issue/9252
t.Skipf("not implemented yet on %s", runtime.GOOS)
case "windows":
if testenv.IsWindowsXP() {
t.Log("skipping broken test on Windows XP (see golang.org/issue/23072)")
return
}
default:
if err != nil {
t.Fatal(err)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment