Browse Source

Revert "ipv4, ipv6, internal/netreflect, bpf: fix the x/net build"

This reverts https://go-review.googlesource.com/c/37401

Updates golang/go#19051.

Change-Id: Ia3cbc42213e3c519f91650e6308a7ca1f56b6189
Reviewed-on: https://go-review.googlesource.com/37417
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Mikio Hara 8 years ago
parent
commit
aa0b216c89
6 changed files with 0 additions and 106 deletions
  1. 0 3
      bpf/vm_bpf_test.go
  2. 0 37
      internal/netreflect/socket_19.go
  3. 0 11
      ipv4/go19_test.go
  4. 0 22
      ipv4/ipv4_test.go
  5. 0 11
      ipv6/go19_test.go
  6. 0 22
      ipv6/ipv6_test.go

+ 0 - 3
bpf/vm_bpf_test.go

@@ -149,9 +149,6 @@ func testOSVM(t *testing.T, filter []bpf.Instruction) (virtualMachine, func()) {
 
 	p := ipv4.NewPacketConn(l)
 	if err = p.SetBPF(prog); err != nil {
-		if err.Error() == "operation not supported" { // TODO: gross. remove once 19051 fixed.
-			t.Skip("Skipping until Issue 19051 is fixed.")
-		}
 		t.Fatalf("failed to attach BPF program to listener: %v", err)
 	}
 

+ 0 - 37
internal/netreflect/socket_19.go

@@ -1,37 +0,0 @@
-// Copyright 2017 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build go1.9
-
-package netreflect
-
-import (
-	"errors"
-	"net"
-)
-
-var (
-	errInvalidType = errors.New("invalid type")
-	errOpNoSupport = errors.New("operation not supported")
-)
-
-// SocketOf returns the socket descriptor of c.
-func SocketOf(c net.Conn) (uintptr, error) {
-	switch c.(type) {
-	case *net.TCPConn, *net.UDPConn, *net.IPConn, *net.UnixConn:
-		return 0, errOpNoSupport
-	default:
-		return 0, errInvalidType
-	}
-}
-
-// PacketSocketOf returns the socket descriptor of c.
-func PacketSocketOf(c net.PacketConn) (uintptr, error) {
-	switch c.(type) {
-	case *net.UDPConn, *net.IPConn, *net.UnixConn:
-		return 0, errOpNoSupport
-	default:
-		return 0, errInvalidType
-	}
-}

+ 0 - 11
ipv4/go19_test.go

@@ -1,11 +0,0 @@
-// Copyright 2017 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build go1.9
-
-package ipv4
-
-func init() {
-	disableTests = true
-}

+ 0 - 22
ipv4/ipv4_test.go

@@ -1,22 +0,0 @@
-// Copyright 2017 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package ipv4
-
-import (
-	"fmt"
-	"os"
-	"testing"
-)
-
-var disableTests = false
-
-func TestMain(m *testing.M) {
-	if disableTests {
-		fmt.Fprintf(os.Stderr, "ipv4 tests disabled in Go 1.9 until netreflect is fixed. (Issue 19051)\n")
-		os.Exit(0)
-	}
-	// call flag.Parse() here if TestMain uses flags
-	os.Exit(m.Run())
-}

+ 0 - 11
ipv6/go19_test.go

@@ -1,11 +0,0 @@
-// Copyright 2017 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build go1.9
-
-package ipv6
-
-func init() {
-	disableTests = true
-}

+ 0 - 22
ipv6/ipv6_test.go

@@ -1,22 +0,0 @@
-// Copyright 2017 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package ipv6
-
-import (
-	"fmt"
-	"os"
-	"testing"
-)
-
-var disableTests = false
-
-func TestMain(m *testing.M) {
-	if disableTests {
-		fmt.Fprintf(os.Stderr, "ipv6 tests disabled in Go 1.9 until netreflect is fixed (Issue 19051)\n")
-		os.Exit(0)
-	}
-	// call flag.Parse() here if TestMain uses flags
-	os.Exit(m.Run())
-}