From 77708f716e46255944251965f8240a0eab01e099 Mon Sep 17 00:00:00 2001 From: Richard Miller Date: Thu, 4 Jul 2024 16:47:43 +0100 Subject: [PATCH] quic: skip tests which depend on unimplemented UDP functions on Plan 9 The ReadMsgUDP and WriteMsgUDP methods of UDPConn are not implemented (yet?) on Plan 9. Skip tests which require them. Fixes golang/go#68288 Change-Id: Ic6c81b19322d589c10b16da61e9b89284294be05 Reviewed-on: https://go-review.googlesource.com/c/net/+/596795 Reviewed-by: Dmitri Shuralyov LUCI-TryBot-Result: Go LUCI Reviewed-by: Than McIntosh --- quic/endpoint_test.go | 5 +++++ quic/udp_test.go | 2 ++ 2 files changed, 7 insertions(+) diff --git a/quic/endpoint_test.go b/quic/endpoint_test.go index 3cba1423e..dc1c51097 100644 --- a/quic/endpoint_test.go +++ b/quic/endpoint_test.go @@ -13,6 +13,7 @@ import ( "io" "log/slog" "net/netip" + "runtime" "testing" "time" @@ -69,6 +70,10 @@ func TestStreamTransfer(t *testing.T) { } func newLocalConnPair(t testing.TB, conf1, conf2 *Config) (clientConn, serverConn *Conn) { + switch runtime.GOOS { + case "plan9": + t.Skipf("ReadMsgUDP not supported on %s", runtime.GOOS) + } t.Helper() ctx := context.Background() e1 := newLocalEndpoint(t, serverSide, conf1) diff --git a/quic/udp_test.go b/quic/udp_test.go index d3732c140..5c4ba10fc 100644 --- a/quic/udp_test.go +++ b/quic/udp_test.go @@ -129,6 +129,8 @@ func runUDPTest(t *testing.T, f func(t *testing.T, u udpTest)) { if test.srcNet == "udp6" && test.dstNet == "udp" { t.Skipf("%v: no support for mapping IPv4 address to IPv6", runtime.GOOS) } + case "plan9": + t.Skipf("ReadMsgUDP not supported on %s", runtime.GOOS) } if runtime.GOARCH == "wasm" && test.srcNet == "udp6" { t.Skipf("%v: IPv6 tests fail when using wasm fake net", runtime.GOARCH)