Skip to content

Commit

Permalink
wgengine: fix logger data race in tests
Browse files Browse the repository at this point in the history
Observed in:
    https://github.com/tailscale/tailscale/actions/runs/8350904950/job/22858266932?pr=11463

Updates tailscale#11226

Signed-off-by: Andrew Dunham <andrew@du.nham.ca>
Change-Id: I9b57db4b34b6ad91d240cd9fa7e344fc0376d52d
  • Loading branch information
andrew-d committed Mar 19, 2024
1 parent e382e4c commit 6da1dc8
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion wgengine/userspace_ext_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"github.com/tailscale/wireguard-go/tun"
"tailscale.com/net/tstun"
"tailscale.com/tsd"
"tailscale.com/tstest"
"tailscale.com/types/logger"
"tailscale.com/wgengine"
"tailscale.com/wgengine/netstack"
Expand All @@ -17,7 +18,10 @@ import (

func TestIsNetstack(t *testing.T) {
sys := new(tsd.System)
e, err := wgengine.NewUserspaceEngine(t.Logf, wgengine.Config{SetSubsystem: sys.Set})
e, err := wgengine.NewUserspaceEngine(
tstest.WhileTestRunningLogger(t),
wgengine.Config{SetSubsystem: sys.Set},
)
if err != nil {
t.Fatal(err)
}
Expand Down

0 comments on commit 6da1dc8

Please sign in to comment.