37 Commits

Author SHA1 Message Date
Tobias Klauser
938ff153cf ipv4, ipv6, nettest: skip unsupported tests on wasip1
Updates golang/go#58141

Change-Id: Iec7a525633dcc93c8941c9aaaef6e54e6867a8d0
Reviewed-on: https://go-review.googlesource.com/c/net/+/485675
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
2023-04-19 19:08:58 +00:00
Bryan C. Mills
eba003a116 ipv6: in PacketConn tests, retry writes that fail with ENOBUFS
In golang/go#37319, TestPacketConnReadWriteMulticastUDP was observed
to occasionally fail with ENOBUFS on macOS.

This change adds a retry loop for that test function. There are some
other related test functions that may also wrap sendmsg, but I have
not observed any ENOBUFS failures for them — I suspect that some
difference in protocol or traffic class prevents this failure mode,
but we can always add more retry loops if we discover that they are
actually needed.

Fixes golang/go#37319.

Change-Id: I99fce94ff10c6f3c09d493712eba782ec8707a58
Reviewed-on: https://go-review.googlesource.com/c/net/+/369742
Trust: Bryan Mills <bcmills@google.com>
Run-TryBot: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2021-12-06 22:34:03 +00:00
Bryan C. Mills
266e24b1e4 ipv6: remove arbitrary deadlines from tests
These deadlines were added back in CL 21080043, apparently in an
attempt to increase code coverage numbers. However, nothing in the
tests actually exercises the deadline logic: the tests would pass even
if these methods were no-ops. Their only apparent effect is to make
the tests flaky on slower builders, and to destroy goroutine traces
if the test should ever happen to deadlock.

Updates golang/go#42064
For golang/go#37319

Change-Id: I530a8f3cb80d6d93d1625bc88f0ec7958d4ec35e
Reviewed-on: https://go-review.googlesource.com/c/net/+/366181
Trust: Bryan Mills <bcmills@google.com>
Run-TryBot: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2021-12-06 22:32:45 +00:00
Ian Lance Taylor
fe8b969b2d ipv6: OpenBSD does not appear to support multicast loopback
Skip the tests for it, as we already skip them on FreeBSD.

Fixes golang/go#42064

Change-Id: I058f25309020367e686625033b4f25cb614c7f99
Reviewed-on: https://go-review.googlesource.com/c/net/+/366355
Trust: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
2021-11-23 20:29:08 +00:00
Tobias Klauser
5f4716e947 ipv6: skip known-failing tests on openbsd-{arm,arm64,mips64}-jsing builders
The arm64 and mips64 builder run OpenBSD 6.8:

openbsd-arm64-jsing:
OpenBSD gopher-arm64.sing.id.au 6.8 GENERIC.MP#2 arm64

openbsd-mips64-jsing:
OS: OpenBSD er4.sing.id.au 6.8 GENERIC.MP#0 octeon

The openbsd-arm-jsing builder was offline but according to
https://github.com/golang/go/issues/25498#issuecomment-636295933
it's running at least OpenBSD 6.7. Assuming that this version is
affected as well (or the builder was upgraded to 6.8 in the meantime),
skip TestPacketConnReadWriteMulticastUDP on this builder as well.

For golang/go#11811.
Updates golang/go#42064.

Change-Id: Ia9919057bfc2a69b8884228508ae919ce9d624e9
Reviewed-on: https://go-review.googlesource.com/c/net/+/283752
Trust: Tobias Klauser <tobias.klauser@gmail.com>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Joel Sing <joel@sing.id.au>
2021-01-19 19:43:25 +00:00
Dmitri Shuralyov
6772e930b6 ipv6: skip known-failing tests on OpenBSD 6.8 builders
These tests are known to be failing on OpenBSD 6.8 and need
investigation. The OpenBSD 6.8 builders are default TryBots
now, so skip them to prevent people working on other packages
from constantly getting a failure.

Issue 42064 remains open to do the work of determining if the
ipv6 package needs to be fixed, or if OpenBSD 6.8 has a problem
and the test can be permanently skipped as unsupported.

For golang/go#11811.
Updates golang/go#42064.
Updates golang/go#35712.

Change-Id: I59883384e4dbce679cb1a4e8e2c3f0fa7983010b
Reviewed-on: https://go-review.googlesource.com/c/net/+/280052
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Alexander Rakoczy <alex@golang.org>
Trust: Dmitri Shuralyov <dmitshur@golang.org>
2020-12-24 01:40:10 +00:00
Cherry Zhang
328152dc79 all: add GOOS=ios
Following CL 254740, this CL does it on x/net.

Updates golang/go#38485.

Change-Id: I80831dd0faa6f216d8d3b8f1af0af811aacce43f
Reviewed-on: https://go-review.googlesource.com/c/net/+/255537
Trust: Cherry Zhang <cherryyz@google.com>
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2020-09-23 18:22:12 +00:00
Tobias Klauser
3b0461eec8 internal/socket, ipv4, ipv6: add support for GOOS=illumos
Treat it like GOOS=solaris for now.

Change-Id: I2b99427e80058f6c7308fe3752de21610457a3ba
Reviewed-on: https://go-review.googlesource.com/c/net/+/183277
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Matt Layher <mdlayher@gmail.com>
2019-06-20 20:02:07 +00:00
chigotc
8dbb310b6f ipv6: add port for aix/ppc64
Change-Id: If8e693cc14109f928bc263f8c5744d7ba5a441ab
Reviewed-on: https://go-review.googlesource.com/c/net/+/170559
Run-TryBot: Mikio Hara <mikioh.public.networking@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Mikio Hara <mikioh.public.networking@gmail.com>
2019-04-19 01:02:38 +00:00
Mikio Hara
63eda1eb06 all: use of nettest, remove internal/nettest
This change uses the nettest package where possible and removes the
internal/nettest package.

Change-Id: I5615a3ab7957183fecea6b5646df99dbb7c186e2
Reviewed-on: https://go-review.googlesource.com/c/net/+/123057
Run-TryBot: Mikio Hara <mikioh.public.networking@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Matt Layher <mdlayher@gmail.com>
2019-03-27 21:43:58 +00:00
Mikio Hara
9f648a60d9 ipv6: skip tests on aix, fuchsia and hurd
Also marks test helper functions.

Change-Id: I1baf791b6d4199699db20834fa6e1a3bd0733cf0
Reviewed-on: https://go-review.googlesource.com/c/net/+/167340
Run-TryBot: Mikio Hara <mikioh.public.networking@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Matt Layher <mdlayher@gmail.com>
2019-03-13 22:02:15 +00:00
Mikio Hara
4cb1c02c05 ipv6: don't fail test on JS
Change-Id: I9dd88938ddf23a80bf7ac40292dc55954f51f275
Reviewed-on: https://go-review.googlesource.com/121557
Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2018-06-29 03:53:31 +00:00
Mikio Hara
45b0d82e15 ipv6: document that package ipv6 doesn't support Darwin kernel version 12 or below
This change also uses nettest.SupportsIPv6MulticastDeliveryOnLoopback
to disable multicast packet delivery tests on some platform that doesn't
support the feature.

Fixes golang/go#17015.

Change-Id: Ia547efc2ac3779a96592bbc3874533fb65b711af
Reviewed-on: https://go-review.googlesource.com/33251
Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2016-11-16 07:49:11 +00:00
Mikio Hara
8566e9372a Revert "ipv6: disable multicast packet delivery tests on darwin 12 or below"
Looks like using IPv6 options on Darwin 12 kernel is a hard task.

This reverts commit 67a4d4ecbc.

Change-Id: I1436e4ff7b42f068e09671ebe9c244a641eefdae
Reviewed-on: https://go-review.googlesource.com/33173
Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Mikio Hara <mikioh.mikioh@gmail.com>
2016-11-14 03:29:31 +00:00
Mikio Hara
67a4d4ecbc ipv6: disable multicast packet delivery tests on darwin 12 or below
Fixes golang/go#17015.

Change-Id: Icfb7a689667e0f1df345d63558f2956596da9fb9
Reviewed-on: https://go-review.googlesource.com/28999
Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2016-11-14 01:08:20 +00:00
Dmitri Shuralyov
5d997795f7 all: make copyright headers consistent with one space after period
Go policy has been single space after periods in comments for some time.

The copyright header template at:

	https://golang.org/doc/contribute.html#copyright

also uses a single space.

Make them all consistent.

This CL was generated with:

	perl -i -npe 's,^(// Copyright [0-9]+ The Go Authors\.)  (All rights reserved\.)$,$1 $2,' $(git grep -l -E '^// Copyright [0-9]+ The Go Authors\.  All rights reserved\.$')

Follows https://golang.org/cl/20111.

Change-Id: I66671dddf821f5dc027bc254e0196b3e3a2bdf3b
Reviewed-on: https://go-review.googlesource.com/32878
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2016-11-07 23:52:11 +00:00
Mikio Hara
a7769702ac ipv6: add support for solaris
This change adds support for Solaris.

To read and write IPv6 ancillary data using ControlMessage, ipv6 pacakge
requires https://go-review.googlesource.com/30171/

Note: Unlike other platforms, Solaris seems to have a few restrictions
on ICMP property access via raw IP sockets. At least applications are
prohibited from using IPV6_CHECKSUM option for ICMP transport.

Fixes golang/go#17324.

Change-Id: Ie014665d94ae6e4955c95d3eea88db90332e20bd
Reviewed-on: https://go-review.googlesource.com/30176
Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2016-10-06 03:49:20 +00:00
Mikio Hara
d5cd7348bf ipv6: simplify log message format
This change replaces the existing log format separated by commas and
spaces with space-separated one.

Also removes unnecessary log output in test.

Change-Id: I7fc5da1b58734a7ee1d06da4e15408bef0162b0b
Reviewed-on: https://go-review.googlesource.com/16323
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2015-12-03 09:14:02 +00:00
Mikio Hara
9dd48c277b ipv6: remove unnecessary double quotations from test messages
Change-Id: I1d91ddf7fb4eebd4782f0621446ec2820d132788
Reviewed-on: https://go-review.googlesource.com/3562
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2015-01-30 07:59:18 +00:00
Mikio Hara
1439fec228 ipv6: make use of nettest.SupportsRawIPSocket
Change-Id: I3cf716c9ae02d7daa0d5a11249c3b58f6c8be2fe
Reviewed-on: https://go-review.googlesource.com/3403
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2015-01-29 21:55:09 +00:00
Mikio Hara
668aea8e02 x/net/ipv6: split Set method of ICMPFilter into Accept, Block methods
This is an API breaking change.

method (*ICMPFilter) Set(ICMPType, bool)

is now replaced with

method (*ICMPFilter) Accept(ICMPType)
method (*ICMPFilter) Block(ICMPType)

LGTM=iant
R=iant
CC=golang-codereviews
https://golang.org/cl/182450043
2014-12-04 17:32:07 +09:00
Mikio Hara
597bbe1988 x/net/ipv6: use new import path for icmp
LGTM=iant
R=iant
CC=golang-codereviews
https://golang.org/cl/183040043
2014-12-03 12:33:31 +09:00
Mikio Hara
b56b609928 x/net/ipv6: fix full stack test cases
Readjusts Traffic Class and ICMP test cases on older darwin kernels,
per-interface link-local address multicasting and loopback interface
required test cases on BSD variants.
Also simplifies error logs.

LGTM=iant
R=iant
CC=golang-codereviews
https://golang.org/cl/177790043
2014-11-16 11:31:00 +09:00
Mikio Hara
40ad15caf3 x/net/ipv6: add support for source-specific multicast
This CL introduces methods for the manipulation of source-specifc
group into PacketConn as follows:

JoinSourceSpecificGroup(*net.Interface, net.Addr, net.Addr) error
LeaveSourceSpecificGroup(*net.Interface, net.Addr, net.Addr) error
ExcludeSourceSpecificGroup(*net.Interface, net.Addr, net.Addr) error
IncludeSourceSpecificGroup(*net.Interface, net.Addr, net.Addr) error

Fixes golang/go#8752.

LGTM=iant
R=iant
CC=golang-codereviews
https://golang.org/cl/169510043
2014-11-14 17:45:32 +09:00
Mikio Hara
586296a63e x/net/ipv6: skip ancillary data socket option tests on non-supported kernels
For old darwin kernels.

LGTM=iant
R=iant
CC=golang-codereviews
https://golang.org/cl/166410043
2014-11-11 06:58:12 +09:00
Mikio Hara
b1772d9247 x/net/ipv6: disable full stack tests on nacl
LGTM=iant
R=iant
CC=golang-codereviews
https://golang.org/cl/172900043
2014-11-10 09:47:55 +09:00
Andrew Gerrand
fbe893ddcd go.net: use golang.org/x/... import paths
LGTM=rsc
R=rsc
CC=golang-codereviews
https://golang.org/cl/167030043
2014-11-10 09:04:43 +11:00
Mikio Hara
77ebfc57e4 go.net/ipv6: make use of internal/{iana,icmp,nettest} packages
LGTM=iant
R=iant
CC=golang-codereviews
https://golang.org/cl/168210043
2014-11-09 20:14:20 +09:00
Mikio Hara
9704df9680 go.net/ipv6: add support for dragonfly
Update golang/go#7174

LGTM=iant
R=golang-codereviews, iant
CC=golang-codereviews
https://golang.org/cl/91770049
2014-04-27 22:30:08 +09:00
Mikio Hara
0cda728e61 go.net/ipv6: fix build on dragonfly, plan9, solaris
R=golang-codereviews, aram, r, 0intro
CC=golang-codereviews
https://golang.org/cl/54350043
2014-01-23 06:36:22 +01:00
Mikio Hara
16ae462212 go.net/ipv6: better readability in test
R=golang-codereviews, dave
CC=golang-codereviews
https://golang.org/cl/46740043
2014-01-01 18:06:29 +09:00
Mikio Hara
1a76020cd9 go.net/ipv6: add missing API tests
Now the package has a code coverage of 76.1% of statements.
Also fixes flaky concurrent test.

Fixes golang/go#5696.

R=golang-codereviews, dave
CC=golang-codereviews
https://golang.org/cl/45620043
2013-12-31 23:24:59 +09:00
Mikio Hara
998fc9edb8 go.net/ipv6: add missing API tests
Now the package has a code coverage of 74.5% of statements.

R=golang-dev, dave
CC=golang-dev
https://golang.org/cl/21080043
2013-11-02 16:50:34 +09:00
Mikio Hara
da09de3034 go.net/ipv6: add ICMP checksum test
This CL enables testing raw ICMP packets with and without a setting of
ICMP checksum field.

Actually it's just for Linux because almost all BSD variants never
allow us to touch the checksum field of ICMP but Linux does when we use
the value 255 for the socket level.

R=golang-dev, dave
CC=golang-dev
https://golang.org/cl/15020047
2013-11-02 16:48:13 +09:00
Mikio Hara
cf6467ec52 go.net/ipv6: update comment on multicast test
That's the reason why we now skip the test on freebsd.

R=dave
CC=golang-dev
https://golang.org/cl/10781043
2013-06-29 19:47:31 +09:00
Mikio Hara
a46af89e38 go.net/ipv6: disable tests on non-ipv6 kernels
R=dave, capnm9
CC=golang-dev
https://golang.org/cl/10051046
2013-06-06 17:12:18 +09:00
Mikio Hara
cdfc4ce106 go.net/ipv6: new package
Package ipv6 implements IP-level socket options for the Internet
Protocol version 6. It also provides datagram based network I/O
methods specific to the IPv6 and higher layer protocols.

Fixes golang/go#5538.

R=dave
CC=golang-dev
https://golang.org/cl/9843044
2013-06-04 17:42:58 +09:00