mirror of
https://github.com/golang/go
synced 2024-11-23 03:50:03 -07:00
net: skip TestModeSocket on older Windows versions
CL 561937 taught os.Stat about IO_REPARSE_TAG_AF_UNIX and added a test for it, TestModeSocket. This test fails on Windows older than 10.0.17063, in which AF_UNIX support was added. Skip the test on those versions. Some CI builders use Windows 10.0.14393, so CL 561937 broke them, e.g. https://build.golang.org/log/5ea4f6422779f32eccfef3a25df54283ddd4e65e. Change-Id: I6c21a78a1454d2d88321478288c0da1b8a93e590 Reviewed-on: https://go-review.googlesource.com/c/go/+/563256 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Reviewed-by: Bryan Mills <bcmills@google.com>
This commit is contained in:
parent
0286a0822b
commit
69d6c7b8ee
@ -33,7 +33,9 @@ func isBuild17063() bool {
|
|||||||
return ver >= 17063
|
return ver >= 17063
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestUnixConnLocalWindows(t *testing.T) {
|
func skipIfUnixSocketNotSupported(t *testing.T) {
|
||||||
|
// TODO: the isBuild17063 check should be enough, investigate why 386 and arm
|
||||||
|
// can't run these tests on newer Windows.
|
||||||
switch runtime.GOARCH {
|
switch runtime.GOARCH {
|
||||||
case "386":
|
case "386":
|
||||||
t.Skip("not supported on windows/386, see golang.org/issue/27943")
|
t.Skip("not supported on windows/386, see golang.org/issue/27943")
|
||||||
@ -43,7 +45,10 @@ func TestUnixConnLocalWindows(t *testing.T) {
|
|||||||
if !isBuild17063() {
|
if !isBuild17063() {
|
||||||
t.Skip("unix test")
|
t.Skip("unix test")
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestUnixConnLocalWindows(t *testing.T) {
|
||||||
|
skipIfUnixSocketNotSupported(t)
|
||||||
handler := func(ls *localServer, ln Listener) {}
|
handler := func(ls *localServer, ln Listener) {}
|
||||||
for _, laddr := range []string{"", testUnixAddr(t)} {
|
for _, laddr := range []string{"", testUnixAddr(t)} {
|
||||||
laddr := laddr
|
laddr := laddr
|
||||||
@ -97,6 +102,7 @@ func TestUnixConnLocalWindows(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestModeSocket(t *testing.T) {
|
func TestModeSocket(t *testing.T) {
|
||||||
|
skipIfUnixSocketNotSupported(t)
|
||||||
addr := testUnixAddr(t)
|
addr := testUnixAddr(t)
|
||||||
|
|
||||||
l, err := Listen("unix", addr)
|
l, err := Listen("unix", addr)
|
||||||
|
Loading…
Reference in New Issue
Block a user