Skip to content

Commit

Permalink
ipv4, ipv6: enable additional tests on darwin and ios
Browse files Browse the repository at this point in the history
These tests seem to work on all supported macOS and iOS versions, so
enable them on darwin and ios.

Change-Id: I95a221e4a7bc925bf1f83b763711f8f9fea03daf
Reviewed-on: https://go-review.googlesource.com/c/net/+/419938
Reviewed-by: Ian Lance Taylor <[email protected]>
Run-TryBot: Tobias Klauser <[email protected]>
TryBot-Result: Gopher Robot <[email protected]>
Reviewed-by: Cherry Mui <[email protected]>
  • Loading branch information
tklauser committed Jul 28, 2022
1 parent f92ba40 commit c7608f3
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 15 deletions.
10 changes: 0 additions & 10 deletions ipv4/unicast_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,11 +161,6 @@ func TestPacketConnReadWriteUnicastICMP(t *testing.T) {
t.Fatal(err)
}
if n, _, _, err := p.ReadFrom(rb); err != nil {
switch runtime.GOOS {
case "darwin", "ios": // older darwin kernels have some limitation on receiving icmp packet through raw socket
t.Logf("not supported on %s", runtime.GOOS)
continue
}
t.Fatal(err)
} else {
m, err := icmp.ParseMessage(iana.ProtocolICMP, rb[:n])
Expand Down Expand Up @@ -251,11 +246,6 @@ func TestRawConnReadWriteUnicastICMP(t *testing.T) {
t.Fatal(err)
}
if _, b, _, err := r.ReadFrom(rb); err != nil {
switch runtime.GOOS {
case "darwin", "ios": // older darwin kernels have some limitation on receiving icmp packet through raw socket
t.Logf("not supported on %s", runtime.GOOS)
continue
}
t.Fatal(err)
} else {
m, err := icmp.ParseMessage(iana.ProtocolICMP, b)
Expand Down
5 changes: 0 additions & 5 deletions ipv6/unicast_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -195,11 +195,6 @@ func TestPacketConnReadWriteUnicastICMP(t *testing.T) {
t.Fatal(err)
}
if n, _, _, err := p.ReadFrom(rb); err != nil {
switch runtime.GOOS {
case "darwin", "ios": // older darwin kernels have some limitation on receiving icmp packet through raw socket
t.Logf("not supported on %s", runtime.GOOS)
continue
}
t.Fatal(err)
} else {
if m, err := icmp.ParseMessage(iana.ProtocolIPv6ICMP, rb[:n]); err != nil {
Expand Down

0 comments on commit c7608f3

Please sign in to comment.