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 <noreply@anthropic.com>
Signed-off-by: Avery Pennarun <apenwarr@tailscale.com>
This commit is contained in:
Avery Pennarun 2026-04-13 19:35:30 +02:00
parent 62ed566a3f
commit c8e41a07f7
2 changed files with 11 additions and 0 deletions

View File

@ -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()

View File

@ -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,