Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
N
net
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
net
Commits
a46af89e
Commit
a46af89e
authored
Jun 06, 2013
by
Mikio Hara
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
go.net/ipv6: disable tests on non-ipv6 kernels
R=dave, capnm9 CC=golang-dev
https://golang.org/cl/10051046
parent
5b599ab5
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
54 additions
and
0 deletions
+54
-0
icmp_test.go
ipv6/icmp_test.go
+3
-0
multicast_test.go
ipv6/multicast_test.go
+6
-0
multicastlistener_test.go
ipv6/multicastlistener_test.go
+12
-0
multicastsockopt_test.go
ipv6/multicastsockopt_test.go
+3
-0
sockopt_test.go
ipv6/sockopt_test.go
+18
-0
unicast_test.go
ipv6/unicast_test.go
+6
-0
unicastsockopt_test.go
ipv6/unicastsockopt_test.go
+6
-0
No files found.
ipv6/icmp_test.go
View file @
a46af89e
...
...
@@ -52,6 +52,9 @@ func TestSetICMPFilter(t *testing.T) {
case
"plan9"
,
"windows"
:
t
.
Skipf
(
"not supported on %q"
,
runtime
.
GOOS
)
}
if
!
supportsIPv6
{
t
.
Skip
(
"ipv6 is not supported"
)
}
if
os
.
Getuid
()
!=
0
{
t
.
Skip
(
"must be root"
)
}
...
...
ipv6/multicast_test.go
View file @
a46af89e
...
...
@@ -19,6 +19,9 @@ func TestPacketConnReadWriteMulticastUDP(t *testing.T) {
case
"plan9"
,
"windows"
:
t
.
Skipf
(
"not supported on %q"
,
runtime
.
GOOS
)
}
if
!
supportsIPv6
{
t
.
Skip
(
"ipv6 is not supported"
)
}
ifi
:=
loopbackInterface
()
if
ifi
==
nil
{
t
.
Skipf
(
"not available on %q"
,
runtime
.
GOOS
)
...
...
@@ -78,6 +81,9 @@ func TestPacketConnReadWriteMulticastICMP(t *testing.T) {
case
"plan9"
,
"windows"
:
t
.
Skipf
(
"not supported on %q"
,
runtime
.
GOOS
)
}
if
!
supportsIPv6
{
t
.
Skip
(
"ipv6 is not supported"
)
}
if
os
.
Getuid
()
!=
0
{
t
.
Skip
(
"must be root"
)
}
...
...
ipv6/multicastlistener_test.go
View file @
a46af89e
...
...
@@ -24,6 +24,9 @@ func TestUDPSinglePacketConnWithMultipleGroupListeners(t *testing.T) {
case
"plan9"
,
"windows"
:
t
.
Skipf
(
"not supported on %q"
,
runtime
.
GOOS
)
}
if
!
supportsIPv6
{
t
.
Skip
(
"ipv6 is not supported"
)
}
for
_
,
gaddr
:=
range
udpMultipleGroupListenerTests
{
c
,
err
:=
net
.
ListenPacket
(
"udp6"
,
"[::]:0"
)
// wildcard address with non-reusable port
...
...
@@ -61,6 +64,9 @@ func TestUDPMultipleConnWithMultipleGroupListeners(t *testing.T) {
case
"plan9"
,
"windows"
:
t
.
Skipf
(
"not supported on %q"
,
runtime
.
GOOS
)
}
if
!
supportsIPv6
{
t
.
Skip
(
"ipv6 is not supported"
)
}
for
_
,
gaddr
:=
range
udpMultipleGroupListenerTests
{
c1
,
err
:=
net
.
ListenPacket
(
"udp6"
,
"[ff02::]:1024"
)
// wildcard address with reusable port
...
...
@@ -110,6 +116,9 @@ func TestUDPPerInterfaceSinglePacketConnWithSingleGroupListener(t *testing.T) {
case
"plan9"
,
"windows"
:
t
.
Skipf
(
"not supported on %q"
,
runtime
.
GOOS
)
}
if
!
supportsIPv6
{
t
.
Skip
(
"ipv6 is not supported"
)
}
gaddr
:=
&
net
.
IPAddr
{
IP
:
net
.
ParseIP
(
"ff02::114"
)}
// see RFC 4727
type
ml
struct
{
...
...
@@ -150,6 +159,9 @@ func TestIPSinglePacketConnWithSingleGroupListener(t *testing.T) {
case
"plan9"
,
"windows"
:
t
.
Skipf
(
"not supported on %q"
,
runtime
.
GOOS
)
}
if
!
supportsIPv6
{
t
.
Skip
(
"ipv6 is not supported"
)
}
if
os
.
Getuid
()
!=
0
{
t
.
Skip
(
"must be root"
)
}
...
...
ipv6/multicastsockopt_test.go
View file @
a46af89e
...
...
@@ -25,6 +25,9 @@ func TestPacketConnMulticastSocketOptions(t *testing.T) {
case
"plan9"
,
"windows"
:
t
.
Skipf
(
"not supported on %q"
,
runtime
.
GOOS
)
}
if
!
supportsIPv6
{
t
.
Skip
(
"ipv6 is not supported"
)
}
ifi
:=
loopbackInterface
()
if
ifi
==
nil
{
t
.
Skipf
(
"not available on %q"
,
runtime
.
GOOS
)
...
...
ipv6/sockopt_test.go
View file @
a46af89e
...
...
@@ -12,6 +12,15 @@ import (
"testing"
)
var
supportsIPv6
bool
func
init
()
{
if
ln
,
err
:=
net
.
Listen
(
"tcp6"
,
"[::1]:0"
);
err
==
nil
{
ln
.
Close
()
supportsIPv6
=
true
}
}
var
condFatalf
=
func
()
func
(
*
testing
.
T
,
string
,
...
interface
{})
{
// A few APIs are not implemented yet on some platforms.
switch
runtime
.
GOOS
{
...
...
@@ -26,6 +35,9 @@ func TestConnInitiatorPathMTU(t *testing.T) {
case
"plan9"
,
"windows"
:
t
.
Skipf
(
"not supported on %q"
,
runtime
.
GOOS
)
}
if
!
supportsIPv6
{
t
.
Skip
(
"ipv6 is not supported"
)
}
ln
,
err
:=
net
.
Listen
(
"tcp6"
,
"[::1]:0"
)
if
err
!=
nil
{
...
...
@@ -56,6 +68,9 @@ func TestConnResponderPathMTU(t *testing.T) {
case
"plan9"
,
"windows"
:
t
.
Skipf
(
"not supported on %q"
,
runtime
.
GOOS
)
}
if
!
supportsIPv6
{
t
.
Skip
(
"ipv6 is not supported"
)
}
ln
,
err
:=
net
.
Listen
(
"tcp6"
,
"[::1]:0"
)
if
err
!=
nil
{
...
...
@@ -86,6 +101,9 @@ func TestPacketConnChecksum(t *testing.T) {
case
"plan9"
,
"windows"
:
t
.
Skipf
(
"not supported on %q"
,
runtime
.
GOOS
)
}
if
!
supportsIPv6
{
t
.
Skip
(
"ipv6 is not supported"
)
}
if
os
.
Getuid
()
!=
0
{
t
.
Skip
(
"must be root"
)
}
...
...
ipv6/unicast_test.go
View file @
a46af89e
...
...
@@ -88,6 +88,9 @@ func TestPacketConnReadWriteUnicastUDP(t *testing.T) {
case
"plan9"
,
"windows"
:
t
.
Skipf
(
"not supported on %q"
,
runtime
.
GOOS
)
}
if
!
supportsIPv6
{
t
.
Skip
(
"ipv6 is not supported"
)
}
c
,
err
:=
net
.
ListenPacket
(
"udp6"
,
"[::1]:0"
)
if
err
!=
nil
{
...
...
@@ -132,6 +135,9 @@ func TestPacketConnReadWriteUnicastICMP(t *testing.T) {
case
"plan9"
,
"windows"
:
t
.
Skipf
(
"not supported on %q"
,
runtime
.
GOOS
)
}
if
!
supportsIPv6
{
t
.
Skip
(
"ipv6 is not supported"
)
}
if
os
.
Getuid
()
!=
0
{
t
.
Skip
(
"must be root"
)
}
...
...
ipv6/unicastsockopt_test.go
View file @
a46af89e
...
...
@@ -17,6 +17,9 @@ func TestConnUnicastSocketOptions(t *testing.T) {
case
"plan9"
,
"windows"
:
t
.
Skipf
(
"not supported on %q"
,
runtime
.
GOOS
)
}
if
!
supportsIPv6
{
t
.
Skip
(
"ipv6 is not supported"
)
}
ln
,
err
:=
net
.
Listen
(
"tcp6"
,
"[::1]:0"
)
if
err
!=
nil
{
...
...
@@ -50,6 +53,9 @@ func TestPacketConnUnicastSocketOptions(t *testing.T) {
case
"plan9"
,
"windows"
:
t
.
Skipf
(
"not supported on %q"
,
runtime
.
GOOS
)
}
if
!
supportsIPv6
{
t
.
Skip
(
"ipv6 is not supported"
)
}
for
_
,
tt
:=
range
packetConnUnicastSocketOptionTests
{
if
tt
.
net
==
"ip6"
&&
os
.
Getuid
()
!=
0
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment