From c8e41a07f7e8113359ed04cfbd72167b7532219c Mon Sep 17 00:00:00 2001 From: Avery Pennarun Date: Mon, 13 Apr 2026 19:35:30 +0200 Subject: [PATCH] tsnet,magicsock: mark tests as flaky on darwin only The tests TestLoopbackLocalAPI, TestLoopbackSOCKS5, and TestTwoDevicePing were previously marked as flaky globally but had their marks removed after fixes. However, they appear to still be flaky specifically on macOS. Re-add flaky marks conditionally for darwin only, allowing the tests to run normally on Linux and Windows where they pass reliably. Change-Id: I7b81a16a12437c9aa55f2c9e9fde08d39499cabe Co-Authored-By: Claude Opus 4.6 Signed-off-by: Avery Pennarun --- tsnet/tsnet_test.go | 7 +++++++ wgengine/magicsock/magicsock_test.go | 4 ++++ 2 files changed, 11 insertions(+) diff --git a/tsnet/tsnet_test.go b/tsnet/tsnet_test.go index 5ee205efd..0aae2205a 100644 --- a/tsnet/tsnet_test.go +++ b/tsnet/tsnet_test.go @@ -44,6 +44,7 @@ import ( "golang.org/x/net/proxy" "tailscale.com/client/local" + "tailscale.com/cmd/testwrapper/flakytest" "tailscale.com/internal/client/tailscale" "tailscale.com/ipn" "tailscale.com/ipn/ipnlocal" @@ -518,6 +519,9 @@ func TestConn(t *testing.T) { } func TestLoopbackLocalAPI(t *testing.T) { + if runtime.GOOS == "darwin" { + flakytest.Mark(t, "https://github.com/tailscale/tailscale/issues/8557") + } tstest.Shard(t) tstest.ResourceCheck(t) ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second) @@ -593,6 +597,9 @@ func TestLoopbackLocalAPI(t *testing.T) { } func TestLoopbackSOCKS5(t *testing.T) { + if runtime.GOOS == "darwin" { + flakytest.Mark(t, "https://github.com/tailscale/tailscale/issues/8198") + } tstest.Shard(t) ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second) defer cancel() diff --git a/wgengine/magicsock/magicsock_test.go b/wgengine/magicsock/magicsock_test.go index 3038803c8..84f22a47a 100644 --- a/wgengine/magicsock/magicsock_test.go +++ b/wgengine/magicsock/magicsock_test.go @@ -39,6 +39,7 @@ import ( "go4.org/mem" "golang.org/x/net/icmp" "golang.org/x/net/ipv4" + "tailscale.com/cmd/testwrapper/flakytest" "tailscale.com/control/controlknobs" "tailscale.com/derp/derpserver" "tailscale.com/disco" @@ -739,6 +740,9 @@ func (localhostListener) ListenPacket(ctx context.Context, network, address stri } func TestTwoDevicePing(t *testing.T) { + if runtime.GOOS == "darwin" { + flakytest.Mark(t, "https://github.com/tailscale/tailscale/issues/11762") + } ln, ip := localhostListener{}, netaddr.IPv4(127, 0, 0, 1) n := &devices{ m1: ln,