diff --git a/cmd/containerboot/main_test.go b/cmd/containerboot/main_test.go index 9905123bd..6b64f3c43 100644 --- a/cmd/containerboot/main_test.go +++ b/cmd/containerboot/main_test.go @@ -1288,6 +1288,9 @@ type testCase struct { } } if p.Notify != nil && p.Notify.InitialStatus == nil { + // Shallow-copy before mutating to avoid a race with + // parallel subtests that share the same *ipn.Notify. + p.Notify = new(*p.Notify) p.Notify.InitialStatus = statusFromNotify(p.Notify) } env.lapi.Notify(p.Notify)