host: 96 more tests run in parallel now the umask is left alone
With #337 fixed, the host tests whose only blocker was reaching edge.SecureUnixListen call t.Parallel(). Each candidate was first run alone under t.Parallel: 21 failed (a helper such as newOffWorld or the into-home fixtures sets the environment, which panics under t.Parallel) and stay sequential, as does TestUnavailableStateRefusesManagedStarts, which failed only beside others. Three full package runs pass.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
58 files changed,
+96
−0
internal/host/agent_layout_test.go+2 −0internal/host/agent_test.go+4 −0internal/host/claimhandover_recovery_test.go+1 −0internal/host/claimparticipation_stale_test.go+1 −0internal/host/claimretirerecovery_test.go+1 −0internal/host/claimservingparksource_linux_test.go+1 −0internal/host/converge_adopted_test.go+1 −0internal/host/edgesclaims_test.go+2 −0internal/host/guardtransaction_test.go+1 −0internal/host/installchannel_identity_test.go+1 −0internal/host/installchannel_policy_test.go+1 −0internal/host/instancekeys_test.go+1 −0internal/host/movescut_test.go+1 −0internal/host/movescutguard_test.go+1 −0internal/host/movesenvskew_test.go+1 −0internal/host/movesfilescap_test.go+1 −0internal/host/movesfinal_test.go+1 −0internal/host/movesland_finalfix_test.go+1 −0internal/host/movesland_test.go+1 −0internal/host/movesphase1_test.go+1 −0internal/host/movesprobe_test.go+2 −0internal/host/movesreport_test.go+2 −0internal/host/movesrevert_test.go+3 −0internal/host/plan10_j2_adapter_test.go+4 −0internal/host/plan10_j2_test.go+1 −0internal/host/plan11_release_test.go+1 −0internal/host/plan12_census_test.go+1 −0internal/host/plan12_fix1_test.go+1 −0internal/host/plan12_handover_test.go+1 −0internal/host/plan12_restore_linux_test.go+1 −0internal/host/plan14_create_participation_test.go+1 −0internal/host/plan14_delete_participation_test.go+1 −0internal/host/plan14_fix2_inventory_test.go+1 −0internal/host/plan14_fix4_live_linux_test.go+1 −0internal/host/plan14_incident_recipe_test.go+1 −0internal/host/plan14_launch_verifier_test.go+1 −0internal/host/plan14_recovery_without_health_test.go+1 −0internal/host/plan14_restart_consumption_test.go+2 −0internal/host/plan9_a_guard_test.go+1 −0internal/host/plan9_d2_test.go+1 −0internal/host/plan9_fix1_stop_test.go+1 −0internal/host/plan9fix1_journal_linux_test.go+2 −0internal/host/plan9fix2_inventory_linux_test.go+1 −0internal/host/proofask_test.go+9 −0internal/host/proofbinding_test.go+3 −0internal/host/proofroot_test.go+3 −0internal/host/relocatepass_round1_test.go+1 −0internal/host/relocationfinish_unix_test.go+1 −0internal/host/relocationfirstwake_unix_test.go+1 −0internal/host/relocationlanding_test.go+1 −0internal/host/relocationreleasehold_test.go+1 −0internal/host/rolloutdeclined_test.go+1 −0internal/host/rootexecution_migration_test.go+3 −0internal/host/runexec_linux_test.go+2 −0internal/host/schedule_rearm_wake_test.go+1 −0internal/host/schedule_wake_test.go+4 −0internal/host/systemapply_test.go+6 −0internal/host/systemparticipation_test.go+2 −0
diff --git a/internal/host/agent_layout_test.go b/internal/host/agent_layout_test.go| index 958bfe704..849a38bc0 100644 |
| --- a/internal/host/agent_layout_test.go |
| +++ b/internal/host/agent_layout_test.go |
| @@ -710,6 +710,7 @@ func TestStartupRecoveryIntentReadsWithAHoldMarker(t *testing.T) { |
| } |
| func TestFastTickLayoutPrecedesClaimSerialNotify(t *testing.T) { |
| + t.Parallel() |
| for _, occupied := range []bool{false, true} { |
| t.Run(map[bool]string{false: "empty", true: "full"}[occupied], func(t *testing.T) { |
| env := newFastFixture(t) |
| @@ -757,6 +758,7 @@ func TestFastTickLayoutPrecedesClaimSerialNotify(t *testing.T) { |
| } |
| func TestSyncExecSerializedFencedClaimHost(t *testing.T) { |
| + t.Parallel() |
| reg := restartTestRegistry(t) |
| store := release.NewDirStore(t.TempDir()) |
| dd := t.TempDir() |
diff --git a/internal/host/agent_test.go b/internal/host/agent_test.go| index cc64235de..67b614b40 100644 |
| --- a/internal/host/agent_test.go |
| +++ b/internal/host/agent_test.go |
| @@ -982,6 +982,7 @@ func TestAdoptPassStartsTheNamedUnitAgainAfterAFailedRestart(t *testing.T) { |
| // release.Pass split on the Hibernate FLAG and handed every flagged route |
| // restart=nil, so the dispatch never ran for the routes it was written for. |
| func TestAdoptPassBouncesAWarmHibernatingInstance(t *testing.T) { |
| + t.Parallel() |
| dir := t.TempDir() |
| optDir := t.TempDir() |
| s := release.NewDirStore(dir) |
| @@ -1223,6 +1224,7 @@ func TestReconcileSerializedRunsBothRecordFamilies(t *testing.T) { |
| // adoptLoop's 1-minute first pass covers boot). After either seed, a CHANGE |
| // runs the full pass set exactly once and an unchanged serial runs nothing. |
| func TestFastTickActsOnSerialChangeNotBoot(t *testing.T) { |
| + t.Parallel() |
| env := newFastFixture(t) |
| var passes int |
| d := env.deps(func() { passes++ }) |
| @@ -1341,6 +1343,7 @@ func TestFastSweepBackoffDoubles(t *testing.T) { |
| // plain.test (Hibernate: false) is only reachable via the positional |
| // restart; both must bounce. |
| func TestFastSweepBouncesAWarmHibernatingCanary(t *testing.T) { |
| + t.Parallel() |
| env := newFastFixture(t) |
| ctx := context.Background() |
| plat := runtime.GOOS + "-" + runtime.GOARCH |
| @@ -1430,6 +1433,7 @@ func TestRestartHoldGrowsCapsAndResetsOnANewVersion(t *testing.T) { |
| // (not one per tick), and a restart that finally succeeds clears the hold at |
| // once. |
| func TestFastSweepBoundsARestartFlap(t *testing.T) { |
| + t.Parallel() |
| env := newFastFixture(t) |
| ctx := context.Background() |
| plat := runtime.GOOS + "-" + runtime.GOARCH |
diff --git a/internal/host/claimhandover_recovery_test.go b/internal/host/claimhandover_recovery_test.go| index 2a5064976..5bb8f784e 100644 |
| --- a/internal/host/claimhandover_recovery_test.go |
| +++ b/internal/host/claimhandover_recovery_test.go |
| @@ -99,6 +99,7 @@ func postRecoveryHandover(t *testing.T, socket string, request coldHandoverReque |
| // The kernel and lease are fixtures. Recovery, persisted receipts, the Unix |
| // root endpoint, cold handover, writer admission and next restore are real. |
| func TestClaimColdHandoverAfterControllerRecoveryReachesNextWake(t *testing.T) { |
| + t.Parallel() |
| for _, boot := range []string{"boot-1", "boot-2"} { |
| t.Run(boot, func(t *testing.T) { |
| ctx := t.Context() |
diff --git a/internal/host/claimparticipation_stale_test.go b/internal/host/claimparticipation_stale_test.go| index b136161f0..ed59d73b3 100644 |
| --- a/internal/host/claimparticipation_stale_test.go |
| +++ b/internal/host/claimparticipation_stale_test.go |
| @@ -23,6 +23,7 @@ func (f staleClaimReader) Read(ctx context.Context, host string) (hostclaim.Obse |
| } |
| func TestPlan9PreviousAgentRetiredParticipation(t *testing.T) { |
| + t.Parallel() |
| for _, mode := range []string{"free", "free-lock-held", "free-without-history", "replacement", "replacement-artifact", "missing-retirement", "artifact", "launch", "fresh-retirement-missing", "fresh-absent", "root", "adopt"} { |
| t.Run(mode, func(t *testing.T) { |
| f := newRecoveryFixture(t) |
diff --git a/internal/host/claimretirerecovery_test.go b/internal/host/claimretirerecovery_test.go| index 353fd1b3b..466d20d08 100644 |
| --- a/internal/host/claimretirerecovery_test.go |
| +++ b/internal/host/claimretirerecovery_test.go |
| @@ -102,6 +102,7 @@ func startRetirementRecoveryTransport(t *testing.T, handler ClaimRootHTTP) strin |
| } |
| func TestClaimRetirementRecoversPersistedLaunchOwner(t *testing.T) { |
| + t.Parallel() |
| f := newRecoveryFixture(t) |
| former := f.controller("boot-1", "controller-1", 4101, "start-1") |
| admitted := former.admit(t, f) |
diff --git a/internal/host/claimservingparksource_linux_test.go b/internal/host/claimservingparksource_linux_test.go| index 2929b82ed..665a461fc 100644 |
| --- a/internal/host/claimservingparksource_linux_test.go |
| +++ b/internal/host/claimservingparksource_linux_test.go |
| @@ -17,6 +17,7 @@ import ( |
| ) |
| func TestServingParkSourceUsesRootInventory(t *testing.T) { |
| + t.Parallel() |
| for _, attack := range []string{"none", "unmaterialized", "duplicate", "owner", "revision", "enrollment", "record", "stamp", "foreign", "missing", "flat", "symlink", "replacement"} { |
| t.Run(attack, func(t *testing.T) { |
| f, _, _, inputs := servingRetirementFixture(t) |
diff --git a/internal/host/converge_adopted_test.go b/internal/host/converge_adopted_test.go| index 2a5840833..e2bdbc889 100644 |
| --- a/internal/host/converge_adopted_test.go |
| +++ b/internal/host/converge_adopted_test.go |
| @@ -278,6 +278,7 @@ func (b *versionedBackend) started() []string { |
| // started, so the ONLY thing that can cycle the instance is the leg — a 90s |
| // grace cannot rescue this test. |
| func TestConvergeLegCyclesARootAdoptedInstanceOnARealActivator(t *testing.T) { |
| + t.Parallel() |
| env := newFastFixture(t) |
| ctx := context.Background() |
| plat := runtime.GOOS + "-" + runtime.GOARCH |
diff --git a/internal/host/edgesclaims_test.go b/internal/host/edgesclaims_test.go| index bf0a75c87..a3f40a519 100644 |
| --- a/internal/host/edgesclaims_test.go |
| +++ b/internal/host/edgesclaims_test.go |
| @@ -247,6 +247,7 @@ func TestEdgesClaimsAFailingClaimDoesNotStarveTheRest(t *testing.T) { |
| // every claim of a 2,000-host box fresh. Timer passes alone come every |
| // five to six minutes and read 256 claims each. |
| func TestEdgesLoopRefreshesEveryClaimWithinTheTTL(t *testing.T) { |
| + t.Parallel() |
| const n = 2000 |
| book := &claimsBook{claims: map[string]*hostclaim.Claim{}} |
| var hosts []string |
| @@ -290,6 +291,7 @@ func TestEdgesLoopRefreshesEveryClaimWithinTheTTL(t *testing.T) { |
| // every write, claim passes wait out the schedule's backoff and their own |
| // failures move it; once writes succeed, the 30-second claim passes resume. |
| func TestEdgesLoopClaimPassesObeyTheRetryBackoff(t *testing.T) { |
| + t.Parallel() |
| book := &claimsBook{claims: map[string]*hostclaim.Claim{}} |
| var hosts []string |
| for i := 0; i < 4000; i++ { // enough that reads stay due throughout |
diff --git a/internal/host/guardtransaction_test.go b/internal/host/guardtransaction_test.go| index 310d0e3aa..ef99b8594 100644 |
| --- a/internal/host/guardtransaction_test.go |
| +++ b/internal/host/guardtransaction_test.go |
| @@ -205,6 +205,7 @@ func TestGuardRecoveryRetainsMarkerOnInvalidImageOrMarker(t *testing.T) { |
| } |
| func TestGuardRecoveryRefusesControllersAfterBegin(t *testing.T) { |
| + t.Parallel() |
| states := []struct { |
| name string |
| malformed bool |
diff --git a/internal/host/installchannel_identity_test.go b/internal/host/installchannel_identity_test.go| index 0387f0d78..7126a9c32 100644 |
| --- a/internal/host/installchannel_identity_test.go |
| +++ b/internal/host/installchannel_identity_test.go |
| @@ -217,6 +217,7 @@ func TestInstallChannelPolicyIdentityInstallsAFreshBoxOnAnUntaggedPointer(t *tes |
| // Every refusal of --identity leaves the box as it was, fetches nothing and |
| // keeps no identity. |
| func TestInstallChannelPolicyIdentityRefusals(t *testing.T) { |
| + t.Parallel() |
| _, otherKey, _ := ed25519.GenerateKey(nil) |
| const notSigned = "the --identity file is not a release identity signed for this deployment, so nothing was installed" |
| const notPublished = "the --identity file is not the identity published for v1.4.0, so nothing was installed" |
diff --git a/internal/host/installchannel_policy_test.go b/internal/host/installchannel_policy_test.go| index 9256ea5cf..db8f0f92f 100644 |
| --- a/internal/host/installchannel_policy_test.go |
| +++ b/internal/host/installchannel_policy_test.go |
| @@ -242,6 +242,7 @@ func TestInstallChannelPolicyArmsAnUpdatedBoxAtTheChannelHead(t *testing.T) { |
| // Each refusal of --policy on the updated box, and on a fresh one, leaves |
| // the box as it was and fetches nothing. |
| func TestInstallChannelPolicyRefusals(t *testing.T) { |
| + t.Parallel() |
| _, otherKey, _ := ed25519.GenerateKey(nil) |
| for _, c := range []struct { |
| name string |
diff --git a/internal/host/instancekeys_test.go b/internal/host/instancekeys_test.go| index 8babc8ff4..c15b5e049 100644 |
| --- a/internal/host/instancekeys_test.go |
| +++ b/internal/host/instancekeys_test.go |
| @@ -250,6 +250,7 @@ func TestBackfillInSlotSkipsAFencedHostAndReadsTheRowAgain(t *testing.T) { |
| // while a row is being written (the layout pass or a move about to move |
| // the host's files) is installed only once the write has returned. |
| func TestBackfillInSlotHoldsOffAFenceUntilTheWriteReturns(t *testing.T) { |
| + t.Parallel() |
| rt := registry.Route{Host: "shop.example.com", Kind: "instance", Status: "ready", Socket: "/run/carlos/shop.example.com.sock"} |
| svc := &activator.Service{} |
| writing, release := make(chan struct{}), make(chan struct{}) |
diff --git a/internal/host/movescut_test.go b/internal/host/movescut_test.go| index e9654fd16..3c926b01a 100644 |
| --- a/internal/host/movescut_test.go |
| +++ b/internal/host/movescut_test.go |
| @@ -939,6 +939,7 @@ func TestArchivedNeverPrecedesTheSealedArchive(t *testing.T) { |
| // and the claim moving/sealed with nobody executing, which anyone who sees |
| // it may finish with the same Flip. |
| func TestFlipWritesRecordThenClaim(t *testing.T) { |
| + t.Parallel() |
| ctx := context.Background() |
| h := newCutHarness(t) |
| h.ready(t) |
diff --git a/internal/host/movescutguard_test.go b/internal/host/movescutguard_test.go| index 31df74b06..65919753e 100644 |
| --- a/internal/host/movescutguard_test.go |
| +++ b/internal/host/movescutguard_test.go |
| @@ -415,6 +415,7 @@ func TestCutGuardRefusalEndsTheStepOnAConflict(t *testing.T) { |
| // staging lease the requested round takes before the holder check is |
| // main's order (ruling T5-lease) and is not this refusal's. |
| func TestCutHolderRefusalEndsTheStepOnAConflict(t *testing.T) { |
| + t.Parallel() |
| ctx := context.Background() |
| for _, phase := range []string{provision.CutRequested, provision.CutAdmitted} { |
| t.Run(phase, func(t *testing.T) { |
diff --git a/internal/host/movesenvskew_test.go b/internal/host/movesenvskew_test.go| index 4e310556a..6c31752ab 100644 |
| --- a/internal/host/movesenvskew_test.go |
| +++ b/internal/host/movesenvskew_test.go |
| @@ -66,6 +66,7 @@ const t3OldReportWant = "the source reported its launch environment in an older |
| // target refuses the source's v1 report at T3, before comparing, named to |
| // named and named to home. |
| func TestT3RefusesAnOlderSourceReport(t *testing.T) { |
| + t.Parallel() |
| for name, opts := range map[string][]p1Option{ |
| "named to named": {realLaunchEnv}, |
| "named to home": {intoHome, realLaunchEnv}, |
diff --git a/internal/host/movesfilescap_test.go b/internal/host/movesfilescap_test.go| index 4380028a7..2a35b54c9 100644 |
| --- a/internal/host/movesfilescap_test.go |
| +++ b/internal/host/movesfilescap_test.go |
| @@ -115,6 +115,7 @@ func putP1Manifest(t *testing.T, h *phase1Harness, loc, gen string, m hostfiles. |
| // target in the claim, the move still preparing. A manifest the readers |
| // accept passes, and the round stages as before. |
| func TestPreparingRefusesAFilesManifestPastTheCap(t *testing.T) { |
| + t.Parallel() |
| for name, c := range capCases { |
| t.Run(name, func(t *testing.T) { |
| h := newPhase1Harness(t) |
diff --git a/internal/host/movesfinal_test.go b/internal/host/movesfinal_test.go| index d7c5c9c98..e4414f0a4 100644 |
| --- a/internal/host/movesfinal_test.go |
| +++ b/internal/host/movesfinal_test.go |
| @@ -773,6 +773,7 @@ func TestMovesParticipantRecord(t *testing.T) { |
| // Plan 5, ruling G17) but wires the registry's delete; an unarmed pass |
| // changes nothing. |
| func TestSourceParkWaitsUnarmedInProduction(t *testing.T) { |
| + t.Parallel() |
| h := newFinalHarness(t) |
| h.commit(t) |
| for name, unarm := range map[string]func(*moveCfg){ |
diff --git a/internal/host/movesland_finalfix_test.go b/internal/host/movesland_finalfix_test.go| index 6f1947d82..a220c6748 100644 |
| --- a/internal/host/movesland_finalfix_test.go |
| +++ b/internal/host/movesland_finalfix_test.go |
| @@ -354,6 +354,7 @@ func TestLandingInstallRefusesASuccessor(t *testing.T) { |
| // deadline and landing_deadline (spec §7.4). The cut deadline here falls a |
| // minute after the flip; the landing deadline is fifteen minutes away. |
| func TestLandingCutDeadlineMarksRollback(t *testing.T) { |
| + t.Parallel() |
| ctx := context.Background() |
| setCutDeadline := func(t *testing.T, h *landingHarness) time.Time { |
| t.Helper() |
diff --git a/internal/host/movesland_test.go b/internal/host/movesland_test.go| index b1fbfb30a..537cd3739 100644 |
| --- a/internal/host/movesland_test.go |
| +++ b/internal/host/movesland_test.go |
| @@ -1681,6 +1681,7 @@ func TestLocalWritesNoFilesManifestBeforeItsStep(t *testing.T) { |
| // Ruling G17: with the park engine's hooks unwired, as armPhase1 leaves |
| // them, the landing is not armed: the pass logs and writes nothing. |
| func TestLandingWaitsUnarmedInProduction(t *testing.T) { |
| + t.Parallel() |
| h := newLandingHarness(t) |
| h.flip(t) |
| h.lw = &movesWorker{mirrors: map[string]lease.MirrorStore{}} |
diff --git a/internal/host/movesphase1_test.go b/internal/host/movesphase1_test.go| index 57f2bc639..60c53ddd0 100644 |
| --- a/internal/host/movesphase1_test.go |
| +++ b/internal/host/movesphase1_test.go |
| @@ -290,6 +290,7 @@ func rewriteP1Claim(t *testing.T, s release.Store, edit func(*hostclaim.Claim)) |
| // And for every point at which the lease turns unsafe, the requests issued |
| // are exactly the checks that passed: no class signs without one. |
| func TestEveryStagingWriteIsGuarded(t *testing.T) { |
| + t.Parallel() |
| h := newPhase1Harness(t) |
| h.start(t, "manual") |
| h.lease.until = h.clock.now.Add(moves.SignatureLife) // inside SignatureLife + skew |
diff --git a/internal/host/movesprobe_test.go b/internal/host/movesprobe_test.go| index b9c3c6202..91c3c7fd7 100644 |
| --- a/internal/host/movesprobe_test.go |
| +++ b/internal/host/movesprobe_test.go |
| @@ -48,6 +48,7 @@ func wakeThenProxy(w http.ResponseWriter, r *http.Request, _ registry.Route, pro |
| // S1 must prove the instance itself answered, in full, with a 2xx, within |
| // its deadline (Task 14 review finding 4). |
| func TestS1ProbeNeedsTheInstanceItself(t *testing.T) { |
| + t.Parallel() |
| ctx := context.Background() |
| answer := func(code int) registry.Route { |
| return instanceForTest(t, func(w http.ResponseWriter, r *http.Request) { |
| @@ -216,6 +217,7 @@ func (b *countingWakeBackend) wakes() int { |
| // committed). ServeScheduled does not read the gate, so the probe must: |
| // whatever the move's state, S1 fails without a wake. |
| func TestS1ProbeNeverWakesAGatedImport(t *testing.T) { |
| + t.Parallel() |
| for _, gate := range []string{strings.Repeat("a", 64), registry.ImportGateClosed} { |
| probe, b := armedProbe(t, gate) |
| got := probe(context.Background(), p1Host, "/") |
diff --git a/internal/host/movesreport_test.go b/internal/host/movesreport_test.go| index 20a420ea8..8565251c9 100644 |
| --- a/internal/host/movesreport_test.go |
| +++ b/internal/host/movesreport_test.go |
| @@ -386,6 +386,7 @@ func TestMeasureDiskIn(t *testing.T) { |
| // The regional S3 measurement writes the probe key outside moves/ with |
| // this box's own client and deletes it (F11). |
| func TestMeasureS3UsesTheProbeKeyAndCleansUp(t *testing.T) { |
| + t.Parallel() |
| f := newFakeMoveMirror() |
| m := measureS3(func(context.Context) (lease.MirrorStore, error) { return f, nil }, "data-uk", (&stepClock{now: time.Now()}).Now) |
| r, err := m(context.Background(), moves.ProbeKey(p1Host, p1ID)) |
| @@ -503,6 +504,7 @@ func TestProbeStoreSpeaksS3(t *testing.T) { |
| // (Task 14 review finding 1). The source's local database file counts when |
| // it is larger; a newest file that is not LTX fails T6 and T11 closed. |
| func TestT11PricesTheLogicalDatabaseSize(t *testing.T) { |
| + t.Parallel() |
| h := newPhase1Harness(t) |
| h.start(t, "manual") |
| newest := ltxForTest(t, 4096, 1<<18, 3, 3) // a 1 GiB database, one page in this file |
diff --git a/internal/host/movesrevert_test.go b/internal/host/movesrevert_test.go| index b9ff01db0..67e1e1150 100644 |
| --- a/internal/host/movesrevert_test.go |
| +++ b/internal/host/movesrevert_test.go |
| @@ -313,6 +313,7 @@ func (h *revertHarness) closed(t *testing.T) { |
| // and rev_phase steps evidence to probing (no baselines, so no verify), op.phase |
| // following (J1). |
| func TestRevertFromStoppingComputesEvidenceFirst(t *testing.T) { |
| + t.Parallel() |
| h := newRevertHarness(t) |
| h.fromStopping(t) |
| h.arm(t) |
| @@ -583,6 +584,7 @@ func TestRetryResumesARevertsRevPhase(t *testing.T) { |
| // record closes with LastMove rolled_back, the offline time counted from the |
| // cut to the reopen, and the source's journal parked. |
| func TestRevertOpensAndReleases(t *testing.T) { |
| + t.Parallel() |
| h := newRevertHarness(t) |
| h.fromStopped(t) |
| h.arm(t) |
| @@ -1139,6 +1141,7 @@ func TestRestatusHoldIsConditional(t *testing.T) { |
| // (§7.4 evidence), so giveUpExecution publishes the report without one, |
| // records no baselines, and the revert goes on. |
| func TestRevertFromStoppingWithUnarchivableFiles(t *testing.T) { |
| + t.Parallel() |
| h := newRevertHarness(t) |
| h.fromStopping(t) |
| if err := os.Symlink("/etc/passwd", filepath.Join(h.cfg.DataDir, p1Host, "link")); err != nil { |
diff --git a/internal/host/plan10_j2_adapter_test.go b/internal/host/plan10_j2_adapter_test.go| index 55dcf7be0..d0dd45363 100644 |
| --- a/internal/host/plan10_j2_adapter_test.go |
| +++ b/internal/host/plan10_j2_adapter_test.go |
| @@ -183,6 +183,7 @@ func TestPlan10J2AdapterRecordsInputsBeforeTheGroupDProbe(t *testing.T) { |
| // this rollback's probe at probing by this box stops the attempt before any |
| // render or wake. |
| func TestPlan10J2AdapterStopsBeforeTheWake(t *testing.T) { |
| + t.Parallel() |
| type tc struct { |
| claimPhase, exec, srcGen string |
| in provision.MoveInputs |
| @@ -295,6 +296,7 @@ func TestPlan10J2AdapterRefusesWithoutItsDependencies(t *testing.T) { |
| // spent nine-attempt budget stops for an operator, a lapsed window or a |
| // changed claim waits for the next pass, anything else is an error. |
| func TestPlan10J2AdapterOutcomes(t *testing.T) { |
| + t.Parallel() |
| other := errors.New("boom") |
| for name, tc := range map[string]struct { |
| wakeErr error |
| @@ -515,6 +517,7 @@ func TestPlan10J2RevertRunUsesProductionAdapter(t *testing.T) { |
| } |
| func TestPlan10J2RevertMissingProviderWaitsWithoutInputsOrWake(t *testing.T) { |
| + t.Parallel() |
| h := newRevertHarness(t) |
| h.fromStopped(t) |
| h.arm(t) |
| @@ -589,6 +592,7 @@ func TestPlan10J2NinthFailedStartSticksAndKeepsJournal(t *testing.T) { |
| } |
| func TestPlan10J2RevertAdapterRejectsChangedBinding(t *testing.T) { |
| + t.Parallel() |
| for _, tc := range []string{"reopened", "generation", "rev_phase", "kind", "executor"} { |
| t.Run(tc, func(t *testing.T) { |
| f := newRecoveryFixture(t) |
diff --git a/internal/host/plan10_j2_test.go b/internal/host/plan10_j2_test.go| index d90eb31cd..57b2f035c 100644 |
| --- a/internal/host/plan10_j2_test.go |
| +++ b/internal/host/plan10_j2_test.go |
| @@ -261,6 +261,7 @@ func TestPlan10J2TeardownReachesForwardOnlyAlongTheRecoveryRow(t *testing.T) { |
| // exactly as a landing's does (before any prelaunch record), and a stop of an |
| // attempt with no prelaunch record never runs the local root's stop. |
| func TestPlan10J2AdmissionFailureReleasesTheRecoveryLease(t *testing.T) { |
| + t.Parallel() |
| probe := activator.StartPolicy{MaxStarts: 5, Window: 30 * time.Second, Probe: true} |
| for _, kind := range []string{hostclaim.KindRestoring, hostclaim.KindReverting} { |
| t.Run(kind, func(t *testing.T) { |
diff --git a/internal/host/plan11_release_test.go b/internal/host/plan11_release_test.go| index 5d2a906ea..caf0536fe 100644 |
| --- a/internal/host/plan11_release_test.go |
| +++ b/internal/host/plan11_release_test.go |
| @@ -18,6 +18,7 @@ import ( |
| ) |
| func TestPlan11ReleaseNeedsExactSignedRootStop(t *testing.T) { |
| + t.Parallel() |
| for _, bad := range []string{"", "unsigned", "wrong-stamp", "retirement", "wrong-enrollment", "wrong-session", "session-zero", "zero-stale", "zero-as-stopped", "positive-as-no-process"} { |
| t.Run(bad, func(t *testing.T) { |
| ctx := context.Background() |
diff --git a/internal/host/plan12_census_test.go b/internal/host/plan12_census_test.go| index dcc769be8..25b88db58 100644 |
| --- a/internal/host/plan12_census_test.go |
| +++ b/internal/host/plan12_census_test.go |
| @@ -102,6 +102,7 @@ func TestPlan12LegacyAndMovesHaveIndependentLabels(t *testing.T) { |
| } |
| func TestPlan12HolderResidueInOtherRegion(t *testing.T) { |
| + t.Parallel() |
| f := newRecoveryFixture(t) |
| o := f.read() |
| c := o.Claim |
diff --git a/internal/host/plan12_fix1_test.go b/internal/host/plan12_fix1_test.go| index c1feb9219..23ea0b360 100644 |
| --- a/internal/host/plan12_fix1_test.go |
| +++ b/internal/host/plan12_fix1_test.go |
| @@ -83,6 +83,7 @@ func TestPlan12InventoryReplayChecksAllTimers(t *testing.T) { |
| } |
| func TestPlan12InitialSourceRecoveryRequiresRootStop(t *testing.T) { |
| + t.Parallel() |
| for _, session := range []uint64{0, 2} { |
| t.Run(fmt.Sprint(session), func(t *testing.T) { |
| f, o, _ := plan12Handover(t, hostclaim.KindRestoring, "stop") |
diff --git a/internal/host/plan12_handover_test.go b/internal/host/plan12_handover_test.go| index 473a2ce9a..7d53e0d50 100644 |
| --- a/internal/host/plan12_handover_test.go |
| +++ b/internal/host/plan12_handover_test.go |
| @@ -153,6 +153,7 @@ func TestPlan12RecoveryPredecessorEvidence(t *testing.T) { |
| } |
| } |
| func TestPlan12RecoveryAdmissionAfterTargetSession(t *testing.T) { |
| + t.Parallel() |
| for _, kind := range []string{hostclaim.KindRestoring} { |
| t.Run(kind, func(t *testing.T) { |
| f, o, h := plan12Handover(t, kind, "stop") |
diff --git a/internal/host/plan12_restore_linux_test.go b/internal/host/plan12_restore_linux_test.go| index c950f72c7..2157b1968 100644 |
| --- a/internal/host/plan12_restore_linux_test.go |
| +++ b/internal/host/plan12_restore_linux_test.go |
| @@ -32,6 +32,7 @@ import ( |
| ) |
| func TestPlan12RecoveryRestoreSourceDatabase(t *testing.T) { |
| + t.Parallel() |
| for _, name := range []string{hostclaim.KindRestoring, hostclaim.KindReverting, "clean-return", "never-restoring", "never-reverting", "never-clean-return", "missing-inventory", "wrong-inventory", "missing-registry", "interrupted", "admission-crash", "prejournal-failure", "intent-crash", "evidence-read-failure", "concurrent-update", "prelaunch-update"} { |
| t.Run(name, func(t *testing.T) { |
| kind, clean := name, name == "clean-return" || name == "never-clean-return" |
diff --git a/internal/host/plan14_create_participation_test.go b/internal/host/plan14_create_participation_test.go| index 20a971f32..0ba7af021 100644 |
| --- a/internal/host/plan14_create_participation_test.go |
| +++ b/internal/host/plan14_create_participation_test.go |
| @@ -17,6 +17,7 @@ import ( |
| ) |
| func TestPlan14CreateParticipationBeforeInstallation(t *testing.T) { |
| + t.Parallel() |
| f, root, _ := plan14InstallRegistration(t, hostclaim.KindServing, "") |
| before := f.read() |
| h := before.Claim.Holder |
diff --git a/internal/host/plan14_delete_participation_test.go b/internal/host/plan14_delete_participation_test.go| index 1a92a2f6d..00afd0358 100644 |
| --- a/internal/host/plan14_delete_participation_test.go |
| +++ b/internal/host/plan14_delete_participation_test.go |
| @@ -13,6 +13,7 @@ import ( |
| ) |
| func TestPlan14OrdinaryDeleteParticipation(t *testing.T) { |
| + t.Parallel() |
| for _, mode := range []string{"live", "stopped", "parking", "retired", "serving stopped", "pending", "record present", "delete absent", "etag", "key", "enrollment", "foreign home", "session", "stamp", "op", "box", "inventory"} { |
| t.Run(mode, func(t *testing.T) { |
| f, root, iq := plan14InstallRegistration(t, hostclaim.KindServing, "") |
diff --git a/internal/host/plan14_fix2_inventory_test.go b/internal/host/plan14_fix2_inventory_test.go| index 95630b9c6..a32c50f1a 100644 |
| --- a/internal/host/plan14_fix2_inventory_test.go |
| +++ b/internal/host/plan14_fix2_inventory_test.go |
| @@ -45,6 +45,7 @@ func TestPlan14Fix2OldInventoryRequestLeavesNoIntent(t *testing.T) { |
| } |
| } |
| func TestPlan14Fix2CommittedInventoryAfterETagChange(t *testing.T) { |
| + t.Parallel() |
| f, root, q := plan14InstallRegistration(t, hostclaim.KindLanding, provision.LandChecking) |
| state := &plan14RegistrationCrash{rollbackDisk: &rollbackDisk{dir: t.TempDir()}} |
| root.Stop.Coordinator.Guard.Root = hostguard.NewRootAuthority(state) |
diff --git a/internal/host/plan14_fix4_live_linux_test.go b/internal/host/plan14_fix4_live_linux_test.go| index 18ecef2ed..0c96d651d 100644 |
| --- a/internal/host/plan14_fix4_live_linux_test.go |
| +++ b/internal/host/plan14_fix4_live_linux_test.go |
| @@ -392,6 +392,7 @@ func TestPlan14Fix4IndexFailureCachedForPass(t *testing.T) { |
| } |
| func TestPlan14Fix4HibernateStartGuard(t *testing.T) { |
| + t.Parallel() |
| e, rt, u, c, _ := plan14AdoptionFixture(t) |
| rt.Hibernate = true |
| if err := e.root.reg.Upsert(rt); err != nil { |
diff --git a/internal/host/plan14_incident_recipe_test.go b/internal/host/plan14_incident_recipe_test.go| index 0d5b22703..832ab8f48 100644 |
| --- a/internal/host/plan14_incident_recipe_test.go |
| +++ b/internal/host/plan14_incident_recipe_test.go |
| @@ -229,6 +229,7 @@ func (s *namedRecordSwitchStore) Get(ctx context.Context, key string) ([]byte, s |
| } |
| func TestPlan14SignedNamedRecoveryUsesOneCanonicalRecord(t *testing.T) { |
| + t.Parallel() |
| e, rt, u, _, _ := plan14AdoptionFixture(t) |
| if _, err := e.store.Put(t.Context(), "accounts/bac/account.json", []byte(`{"id":2,"sqid":"bac"}`), ""); err != nil { |
| t.Fatal(err) |
diff --git a/internal/host/plan14_launch_verifier_test.go b/internal/host/plan14_launch_verifier_test.go| index 9b8b55172..36fe2e445 100644 |
| --- a/internal/host/plan14_launch_verifier_test.go |
| +++ b/internal/host/plan14_launch_verifier_test.go |
| @@ -53,6 +53,7 @@ func TestPlan14LaunchVerifierToken(t *testing.T) { |
| } |
| func TestPlan14LaunchVerifierCallerOrder(t *testing.T) { |
| + t.Parallel() |
| for _, name := range []string{"idle", "begin", "end", "recover", "activation", "floor-begin", "floor-end", "system-begin", "system-clear", "system-recovery", "guard-close", "guard-rollback"} { |
| t.Run(name, func(t *testing.T) { |
| lock := &plan14ReleaseStore{} |
diff --git a/internal/host/plan14_recovery_without_health_test.go b/internal/host/plan14_recovery_without_health_test.go| index 65c53c1ec..0962ed521 100644 |
| --- a/internal/host/plan14_recovery_without_health_test.go |
| +++ b/internal/host/plan14_recovery_without_health_test.go |
| @@ -51,6 +51,7 @@ func TestPlan14SignedRestartWithoutHealthHistory(t *testing.T) { |
| } |
| func TestPlan14CapturedRollbackWithoutHealthHistory(t *testing.T) { |
| + t.Parallel() |
| e, rt, u, c, _ := plan14AdoptionFixture(t) |
| before, err := c.host(t.Context(), rt.Host) |
| if err != nil { |
diff --git a/internal/host/plan14_restart_consumption_test.go b/internal/host/plan14_restart_consumption_test.go| index f66b0e9b2..d9ca287e9 100644 |
| --- a/internal/host/plan14_restart_consumption_test.go |
| +++ b/internal/host/plan14_restart_consumption_test.go |
| @@ -166,6 +166,7 @@ func TestPlan14RootRestartProductionHeldRollover(t *testing.T) { |
| } |
| func TestPlan14RootRestartProductionBindingChange(t *testing.T) { |
| + t.Parallel() |
| f := newRestartConsumptionFixture(t) |
| if err := f.run(t); err != nil { |
| t.Fatal(err) |
| @@ -433,6 +434,7 @@ func TestPlan14RootRestartProductionCanonicalSelection(t *testing.T) { |
| } |
| func TestPlan14RootRestartProductionReplacedInstallation(t *testing.T) { |
| + t.Parallel() |
| f := newRestartConsumptionFixture(t) |
| if err := f.run(t); err != nil { |
| t.Fatal(err) |
diff --git a/internal/host/plan9_a_guard_test.go b/internal/host/plan9_a_guard_test.go| index 66381082b..d18294dc1 100644 |
| --- a/internal/host/plan9_a_guard_test.go |
| +++ b/internal/host/plan9_a_guard_test.go |
| @@ -80,6 +80,7 @@ func plan9aAbsent(t *testing.T, paths ...string) { |
| // completion. Root's marker and transaction go, so the box is not wedged, |
| // and the console's reservation stays held for a retry or an operator. |
| func TestPlan9AUnchangedTransactionRecordsNoCompletion(t *testing.T) { |
| + t.Parallel() |
| for _, state := range []string{"prepared", "staging-failed", "late-participation", "abandoned-install"} { |
| t.Run(state, func(t *testing.T) { |
| f, id := plan9aTargetFixture(t) |
diff --git a/internal/host/plan9_d2_test.go b/internal/host/plan9_d2_test.go| index 667f1c75b..f6456a7c2 100644 |
| --- a/internal/host/plan9_d2_test.go |
| +++ b/internal/host/plan9_d2_test.go |
| @@ -320,6 +320,7 @@ func TestPlan9D2CrossBoxHandoverAuthorizesFromTheSealedCut(t *testing.T) { |
| } |
| func TestPlan9D2CrossBoxHandoverRefusesWithoutExactEvidence(t *testing.T) { |
| + t.Parallel() |
| for name, tc := range map[string]struct { |
| claim func(*hostclaim.Claim) |
| prior func(*hostclaim.Claim) |
diff --git a/internal/host/plan9_fix1_stop_test.go b/internal/host/plan9_fix1_stop_test.go| index 1b976a899..0d87cf3d4 100644 |
| --- a/internal/host/plan9_fix1_stop_test.go |
| +++ b/internal/host/plan9_fix1_stop_test.go |
| @@ -44,6 +44,7 @@ func plan9Fix1StopAtCommitted(t *testing.T) (*recoveryFixture, *recoveryControll |
| // that exact session at committed, the signed receipt verifies, and the |
| // pending lease is released so the host's next admission is not refused. |
| func TestPlan9Fix1TeardownStopsAProbeThatReachedCommitted(t *testing.T) { |
| + t.Parallel() |
| for name, teardown := range map[string]func(context.Context, *recoveryController, hostclaim.Observed, hostclaim.Observed) error{ |
| "stop": func(ctx context.Context, c *recoveryController, checkpoint, _ hostclaim.Observed) error { |
| return c.wake.Stop(ctx, checkpoint) |
diff --git a/internal/host/plan9fix1_journal_linux_test.go b/internal/host/plan9fix1_journal_linux_test.go| index 642ef8bbe..0776ae92a 100644 |
| --- a/internal/host/plan9fix1_journal_linux_test.go |
| +++ b/internal/host/plan9fix1_journal_linux_test.go |
| @@ -61,6 +61,7 @@ func plan9Fix1RootRetire(t *testing.T) (ClaimRootHTTP, hostguard.FenceTarget, *r |
| // own stop inventory does not name, even when it decodes strictly and matches |
| // the host, incarnation, stamp, ownership, target and stop receipt. |
| func TestPlan9Fix1RootRetireRefusesPlantedJournalArtifacts(t *testing.T) { |
| + t.Parallel() |
| for _, rootName := range []string{"data", "opt", "units"} { |
| t.Run(rootName, func(t *testing.T) { |
| root, target, reg, base := plan9Fix1RootRetire(t) |
| @@ -111,6 +112,7 @@ func TestPlan9Fix1RootRetireRefusesPlantedJournalArtifacts(t *testing.T) { |
| // C-1: a symlinked retirement journal directory is refused before any write. |
| func TestPlan9Fix1RootRetireRefusesSymlinkedJournalDir(t *testing.T) { |
| + t.Parallel() |
| root, target, reg, base := plan9Fix1RootRetire(t) |
| victim := filepath.Join(base, "victim") |
| if err := os.Mkdir(victim, 0700); err != nil { |
diff --git a/internal/host/plan9fix2_inventory_linux_test.go b/internal/host/plan9fix2_inventory_linux_test.go| index de66f0a90..6db3604de 100644 |
| --- a/internal/host/plan9fix2_inventory_linux_test.go |
| +++ b/internal/host/plan9fix2_inventory_linux_test.go |
| @@ -18,6 +18,7 @@ import ( |
| ) |
| func TestR2InventoryNamesForeignArtifact(t *testing.T) { |
| + t.Parallel() |
| for _, rootName := range []string{"opt", "units", "data"} { |
| t.Run(rootName, func(t *testing.T) { |
| root, target, reg, base := plan9Fix1RootRetire(t) |
diff --git a/internal/host/proofask_test.go b/internal/host/proofask_test.go| index b64fbf476..c06022dfe 100644 |
| --- a/internal/host/proofask_test.go |
| +++ b/internal/host/proofask_test.go |
| @@ -46,6 +46,7 @@ func mintAskerFixture(t *testing.T, activeFor time.Duration) (*mintAsker, *int, |
| // Review focus 5: the relay can drop a request and a mint write can fail, so |
| // the agent asks every 2 minutes until it sees the proof, then stops. |
| func TestMintAskerReasksUntilTheProofAppears(t *testing.T) { |
| + t.Parallel() |
| a, asked, clock, store, sha := mintAskerFixture(t, 20*time.Minute) |
| ctx := context.Background() |
| t0 := *clock |
| @@ -115,6 +116,7 @@ func putDevProof(t *testing.T, store release.Store, sha string, at time.Time) { |
| // finds no proof for it, and asks root again, rather than answering from the |
| // old file's hash and the proof it found for that. |
| func TestMintAskerRehashesAReusedVersionPath(t *testing.T) { |
| + t.Parallel() |
| a, asked, clock, store, sha := mintAskerFixture(t, 20*time.Minute) |
| ctx := context.Background() |
| t0 := *clock |
| @@ -144,6 +146,7 @@ func TestMintAskerRehashesAReusedVersionPath(t *testing.T) { |
| // The same bytes rewritten in place with a new mtime are hashed again too: |
| // size and mtime are part of the file's identity, not only its inode. |
| func TestMintAskerRehashesAFileRewrittenInPlace(t *testing.T) { |
| + t.Parallel() |
| a, asked, clock, store, sha := mintAskerFixture(t, 20*time.Minute) |
| ctx := context.Background() |
| t0 := *clock |
| @@ -168,6 +171,7 @@ func TestMintAskerRehashesAFileRewrittenInPlace(t *testing.T) { |
| // The proven cache is per proof object: a proof seen for one prover does not |
| // answer for another after the policy changes prover. |
| func TestMintAskerProvenCacheIsPerProver(t *testing.T) { |
| + t.Parallel() |
| a, asked, clock, store, sha := mintAskerFixture(t, 20*time.Minute) |
| ctx := context.Background() |
| t0 := *clock |
| @@ -187,6 +191,7 @@ func TestMintAskerProvenCacheIsPerProver(t *testing.T) { |
| } |
| func TestMintAskerWaitsOutTheBake(t *testing.T) { |
| + t.Parallel() |
| a, asked, _, store, sha := mintAskerFixture(t, 5*time.Minute) |
| a.tick(context.Background()) |
| if *asked != 0 { |
| @@ -201,6 +206,7 @@ func TestMintAskerWaitsOutTheBake(t *testing.T) { |
| // nothing until it parses, so the asker has nothing to ask for and stays |
| // quiet rather than reading the broken file as "no prove block" and guessing. |
| func TestMintAskerAsksNothingOnABrokenPolicy(t *testing.T) { |
| + t.Parallel() |
| a, asked, _, store, sha := mintAskerFixture(t, 20*time.Minute) |
| if err := os.WriteFile(a.policyPath, []byte(`{"schema":1,"prove":`), 0o644); err != nil { |
| t.Fatal(err) |
| @@ -218,6 +224,7 @@ func TestMintAskerAsksNothingOnABrokenPolicy(t *testing.T) { |
| // the fast set while it waits (at the gate's 30 s cadence), and leaves once |
| // it adopts. |
| func TestFastMembersKeepsAWaitingRoute(t *testing.T) { |
| + t.Parallel() |
| f := newFastFixture(t) |
| ctx := context.Background() |
| host := "edge.example.com" |
| @@ -289,6 +296,7 @@ func TestFastMembersKeepsAWaitingRoute(t *testing.T) { |
| // whose head is unproven waits like a staged one, and rejoins the sweep each |
| // time its 30 s miss runs out. Its unstaged backoff must not stretch that. |
| func TestFastMembersKeepsAnUnstagedWaitingRouteAtTheMissCadence(t *testing.T) { |
| + t.Parallel() |
| f := newFastFixture(t) |
| ctx := context.Background() |
| host := "new.example.com" |
| @@ -334,6 +342,7 @@ func TestFastMembersKeepsAnUnstagedWaitingRouteAtTheMissCadence(t *testing.T) { |
| // adoptHost returns before the gate) must not keep its host in the sweep |
| // every tick. It backs off like an unstaged route. |
| func TestFastMembersBacksOffAWaitTheSweepLeftStanding(t *testing.T) { |
| + t.Parallel() |
| f := newFastFixture(t) |
| ctx := context.Background() |
| host := "edge.example.com" |
diff --git a/internal/host/proofbinding_test.go b/internal/host/proofbinding_test.go| index 2e1252212..7383fcaa3 100644 |
| --- a/internal/host/proofbinding_test.go |
| +++ b/internal/host/proofbinding_test.go |
| @@ -171,6 +171,7 @@ func TestPlan14ProofBindingChangesAfterObservation(t *testing.T) { |
| } |
| func TestPlan14OrdinaryInstanceBinding(t *testing.T) { |
| + t.Parallel() |
| e, rt, rec, source := plan14ProofFixture(t) |
| rec.Addr, rec.Unit = "", "" |
| plan14PutRecord(t, e.store, rec) |
| @@ -198,6 +199,7 @@ func TestPlan14OrdinaryInstanceBinding(t *testing.T) { |
| } |
| func TestPlan14RootRestartDispatchFromRecord(t *testing.T) { |
| + t.Parallel() |
| e, rt, rec, source := plan14ProofFixture(t) |
| rec.Unit = "" |
| rt.Unit = "" |
| @@ -219,6 +221,7 @@ func TestPlan14RootRestartDispatchFromRecord(t *testing.T) { |
| } |
| func TestPlan14ProofClaimBinding(t *testing.T) { |
| + t.Parallel() |
| e, rt, rec, s := plan14ProofFixture(t) |
| observed := hostclaim.Observed{Host: rec.Host, ETag: "claim-one", Claim: &hostclaim.Claim{Host: rec.Host, Holder: &hostclaim.Holder{Key: provision.RecordKey(rec.Account, rec.App, rec.Host), Account: rec.Account, App: rec.App, Incarnation: "inc", Stamp: 1, Session: 1, WriterBox: "box"}, Op: hostclaim.Op{Kind: hostclaim.KindServing, Exec: "box"}}} |
| s.claim = func(context.Context, string) (hostclaim.Observed, error) { return observed, nil } |
diff --git a/internal/host/proofroot_test.go b/internal/host/proofroot_test.go| index eb5ec6749..b41b0e23a 100644 |
| --- a/internal/host/proofroot_test.go |
| +++ b/internal/host/proofroot_test.go |
| @@ -111,6 +111,7 @@ func (e *proofRootEnv) signed(t *testing.T, provenAt time.Time) *release.Proof { |
| } |
| func TestProofRootMintsWhenEveryConditionHolds(t *testing.T) { |
| + t.Parallel() |
| e := newProofRootEnv(t, provePolicy) |
| e.root.run(context.Background()) |
| p := e.proof(t) |
| @@ -153,6 +154,7 @@ func TestProofRootMintsPastAMovesHeldRefusal(t *testing.T) { |
| } |
| func TestProofRootNeverOverwritesAProof(t *testing.T) { |
| + t.Parallel() |
| e := newProofRootEnv(t, provePolicy) |
| first := e.signed(t, e.now.Add(-time.Minute)) |
| if err := release.PutProof(context.Background(), e.store, "bab", first); err != nil { |
| @@ -300,6 +302,7 @@ func TestProofRootHourlyLineWhenRequirementIsOff(t *testing.T) { |
| // hourly passes still leaves its trail. Deleting the whole file (the other |
| // break glass) is "off" too. |
| func TestProofRootRequireEntryLeavesTheMarker(t *testing.T) { |
| + t.Parallel() |
| e := newProofRootEnv(t, nil) |
| if err := os.WriteFile(e.root.policyPath, []byte(fmt.Sprintf( |
| `{"schema":1,"require":[{"app":"console","prover":"dev","key":%q}]}`, e.pubB64)), 0o644); err != nil { |
diff --git a/internal/host/relocatepass_round1_test.go b/internal/host/relocatepass_round1_test.go| index 8094f69c0..c7e0e6041 100644 |
| --- a/internal/host/relocatepass_round1_test.go |
| +++ b/internal/host/relocatepass_round1_test.go |
| @@ -66,6 +66,7 @@ func passRegistry(t *testing.T, hosts ...string) *registry.Registry { |
| // many rows. A pass that finds pending completions asks which box this is |
| // once, however many it finds. |
| func TestCompletionPassAsksNothingMoreWithNothingPending(t *testing.T) { |
| + t.Parallel() |
| ctx := t.Context() |
| store := &countingClaims{Store: release.NewDirStore(t.TempDir())} |
| for _, host := range []string{"a.example", "b.example", "c.example"} { |
diff --git a/internal/host/relocationfinish_unix_test.go b/internal/host/relocationfinish_unix_test.go| index 4047b0e7b..9208fd079 100644 |
| --- a/internal/host/relocationfinish_unix_test.go |
| +++ b/internal/host/relocationfinish_unix_test.go |
| @@ -151,6 +151,7 @@ func (w *finishWorld) done(discharges int) { |
| // claim's record on every pass, whatever the row says, and every step |
| // resumes after a failure or a crash at any point, through the pass. |
| func TestRelocatePassFinishesACompletionFromItsRecord(t *testing.T) { |
| + t.Parallel() |
| t.Run("in one pass", func(t *testing.T) { |
| w := newFinishWorld(t) |
| w.pass() |
diff --git a/internal/host/relocationfirstwake_unix_test.go b/internal/host/relocationfirstwake_unix_test.go| index 93f1bacb6..5a17c96c1 100644 |
| --- a/internal/host/relocationfirstwake_unix_test.go |
| +++ b/internal/host/relocationfirstwake_unix_test.go |
| @@ -37,6 +37,7 @@ import ( |
| // dials root at the fixed controlsock.Path, chowns its state directory to |
| // the carlos uid and needs a cgroup manager. Checklist item 12 is that run. |
| func TestCompletionPassThenFirstServingWakeWithRegionHAOff(t *testing.T) { |
| + t.Parallel() |
| ctx := t.Context() |
| f := newRecoveryFixture(t) |
| const box, op = "box-1", "rel-1" |
diff --git a/internal/host/relocationlanding_test.go b/internal/host/relocationlanding_test.go| index 8e33b24cb..938bb78a0 100644 |
| --- a/internal/host/relocationlanding_test.go |
| +++ b/internal/host/relocationlanding_test.go |
| @@ -155,6 +155,7 @@ func TestRelocatePassConvertsAFencedCommittedLanding(t *testing.T) { |
| // None of them writes the claim, though the move committed and its target |
| // is fenced. |
| func TestRelocatePassConversionRefusesAnUnauthorizedWorker(t *testing.T) { |
| + t.Parallel() |
| type tc struct { |
| name string |
| change func(*hostactors.Roster) |
diff --git a/internal/host/relocationreleasehold_test.go b/internal/host/relocationreleasehold_test.go| index aadd722fc..2f2ffe45d 100644 |
| --- a/internal/host/relocationreleasehold_test.go |
| +++ b/internal/host/relocationreleasehold_test.go |
| @@ -35,6 +35,7 @@ import ( |
| // done; a claim that does not serve on this box is left alone and is |
| // ErrChanged. |
| func TestRelocationReleaseHoldWaitsForDischarge(t *testing.T) { |
| + t.Parallel() |
| const host, box = "shop.example", "dst" |
| ctx := t.Context() |
| created := time.Date(2026, 10, 7, 0, 0, 0, 0, time.UTC) |
diff --git a/internal/host/rolloutdeclined_test.go b/internal/host/rolloutdeclined_test.go| index c198144ad..406bbfa12 100644 |
| --- a/internal/host/rolloutdeclined_test.go |
| +++ b/internal/host/rolloutdeclined_test.go |
| @@ -689,6 +689,7 @@ func TestDeclinedBoxHonoursHoldRanMarkers(t *testing.T) { |
| // its launch snapshot resolved from the live link, before anything is asked |
| // of root. A box that honours nothing is today's. |
| func TestDeclinedBoxGatesAClaimsBackedWake(t *testing.T) { |
| + t.Parallel() |
| f := newAdminTokenFixture(t, "box-1") |
| if err := os.WriteFile(f.envPath(), []byte("CARLOS_ADMIN_TOKEN=tok-0123456789abcdef0123456789abcdef\n"), 0o600); err != nil { |
| t.Fatal(err) |
diff --git a/internal/host/rootexecution_migration_test.go b/internal/host/rootexecution_migration_test.go| index 76ee2f53c..54f2b3cf4 100644 |
| --- a/internal/host/rootexecution_migration_test.go |
| +++ b/internal/host/rootexecution_migration_test.go |
| @@ -159,6 +159,7 @@ func TestPlan14ExecutionRetainedSourceParticipation(t *testing.T) { |
| } |
| func TestPlan14ExecutionInstalledWithoutLaunchCleanup(t *testing.T) { |
| + t.Parallel() |
| for _, positive := range []bool{false, true} { |
| t.Run(fmt.Sprint(positive), func(t *testing.T) { |
| f, root, iq := plan14InstallRegistration(t, hostclaim.KindLanding, "checking") |
| @@ -230,6 +231,7 @@ func TestPlan14ExecutionRecoveryStartsCanonicalFence(t *testing.T) { |
| } |
| func TestPlan14ExecutionFirstSessionTransition(t *testing.T) { |
| + t.Parallel() |
| f, root, iq := plan14InstallRegistration(t, hostclaim.KindLanding, "checking") |
| q := executionExpectation(f.read().Claim) |
| before, err := root.executionAuthority(t.Context(), q, execlease.ControllerProcess{}) |
| @@ -259,6 +261,7 @@ func TestPlan14ExecutionFirstSessionTransition(t *testing.T) { |
| } |
| func TestPlan14ExecutionEstablishedSessionTransitionNeedsCleanup(t *testing.T) { |
| + t.Parallel() |
| for _, clean := range []bool{false, true} { |
| t.Run(fmt.Sprint(clean), func(t *testing.T) { |
| f, root, iq := plan14InstallRegistration(t, hostclaim.KindLanding, "checking") |
diff --git a/internal/host/runexec_linux_test.go b/internal/host/runexec_linux_test.go| index 842a67fa4..76b55e4cc 100644 |
| --- a/internal/host/runexec_linux_test.go |
| +++ b/internal/host/runexec_linux_test.go |
| @@ -238,6 +238,7 @@ func (c ctxStore) Put(ctx context.Context, key string, body []byte, ifMatch stri |
| } |
| func TestRunCancelledAfterLaunch(t *testing.T) { |
| + t.Parallel() |
| s := ctxStore{release.NewDirStore(t.TempDir())} |
| rec, req := pickedRun(t, s, 60) |
| done := instancectl.CmdStatus{State: instancectl.CmdDone, InvocationID: "inv1", Result: "exit-code", Status: "143", Code: "1"} |
| @@ -754,6 +755,7 @@ func (l *rechecksAfterSwitch) RunCmd(ctx context.Context, rt registry.Route, spe |
| // the run's own end, cancelled (130) or timed out (124), never "start |
| // failed" (re-review 7). |
| func TestRunEndedDuringThePostSwitchRecheckGetsItsOwnResult(t *testing.T) { |
| + t.Parallel() |
| t.Run("cancelled", func(t *testing.T) { |
| s := &blockOneRead{Store: release.NewDirStore(t.TempDir()), reading: make(chan struct{})} |
| rec, req := pickedRun(t, s, 60) |
diff --git a/internal/host/schedule_rearm_wake_test.go b/internal/host/schedule_rearm_wake_test.go| index 560861d41..4a3926478 100644 |
| --- a/internal/host/schedule_rearm_wake_test.go |
| +++ b/internal/host/schedule_rearm_wake_test.go |
| @@ -15,6 +15,7 @@ import ( |
| ) |
| func TestSleepingInstanceRearmsItsNextDeliveryBeforeReturning(t *testing.T) { |
| + t.Parallel() |
| const host = "rearm.bab.oncarlos.com" |
| const idle = 200 * time.Millisecond |
| entered := make(chan struct{}, 1) |
diff --git a/internal/host/schedule_wake_test.go b/internal/host/schedule_wake_test.go| index 4cd0d4109..3c14e09d1 100644 |
| --- a/internal/host/schedule_wake_test.go |
| +++ b/internal/host/schedule_wake_test.go |
| @@ -215,6 +215,7 @@ func wakeFixture(t *testing.T, host string, idle time.Duration, h http.HandlerFu |
| // this pins is that the runner's delivery leg drives that machinery correctly |
| // from a sleeping start. |
| func TestScheduledTickWakesASleepingInstanceAndItHibernatesAgain(t *testing.T) { |
| + t.Parallel() |
| const host = "sleepy.bab.oncarlos.com" |
| // The idle window is short so the test can watch a real hibernation. |
| const idle = 400 * time.Millisecond |
| @@ -389,6 +390,7 @@ func TestDeliveryReusesTheConnectionForASocket(t *testing.T) { |
| // Asserted by firing one: a once-row on a storeless box's registry is |
| // delivered to its instance and finishes. |
| func TestArmScheduleFiresOnceTimersWithNoDeployStore(t *testing.T) { |
| + t.Parallel() |
| const host = "storeless.bab.oncarlos.com" |
| served := make(chan struct{}, 1) |
| reg, _, svc, dd := wakeFixture(t, host, 30*time.Second, func(w http.ResponseWriter, r *http.Request) { |
| @@ -447,6 +449,7 @@ func TestArmScheduleFiresOnceTimersWithNoDeployStore(t *testing.T) { |
| // back for the same path, dropped when its delivery errors, and the whole map |
| // reset rather than grown past maxProxyCache. |
| func TestProxyCacheIsStableAndBounded(t *testing.T) { |
| + t.Parallel() |
| d := &activatorDeliverer{} |
| first := d.proxyFor("/run/carlos/a.sock") |
| if again := d.proxyFor("/run/carlos/a.sock"); again != first { |
| @@ -550,6 +553,7 @@ func TestUnixProxyKeepsTheShapeCloseIdleNeeds(t *testing.T) { |
| // leg alone. The sweep guard (which reads the timers table) would correctly |
| // hold a host awake for a tick due this soon, and that is Task 3's test. |
| func TestDeliveryDoesNotHoldTheInstanceAwake(t *testing.T) { |
| + t.Parallel() |
| const host = "ticky.bab.oncarlos.com" |
| const idle = 300 * time.Millisecond |
| reg, inst, svc, _ := wakeFixture(t, host, idle, func(w http.ResponseWriter, r *http.Request) { |
diff --git a/internal/host/systemapply_test.go b/internal/host/systemapply_test.go| index c76bf1a76..ee79416d8 100644 |
| --- a/internal/host/systemapply_test.go |
| +++ b/internal/host/systemapply_test.go |
| @@ -253,6 +253,7 @@ func TestApplyChannelComesFromRootNotTheRequest(t *testing.T) { |
| } |
| func TestApplyStaleTupleIsRefusedAgainstTheRequestsTuple(t *testing.T) { |
| + t.Parallel() |
| f := newApplyFixture(t, "stable", "v1") |
| old := f.promote("v2", []byte("x"), false) |
| time.Sleep(1100 * time.Millisecond) |
| @@ -907,6 +908,7 @@ func TestApplyRollbackRestartsTheRelay(t *testing.T) { |
| } |
| func TestApplyRollbackFailedLeavesPrevAndAppliedAlone(t *testing.T) { |
| + t.Parallel() |
| f, req := applyHappy(t) |
| writeJSONDurable(filepath.Join(systemRootDir(f.a.optDir), "applied.json"), systemApplied{Version: "v1", Channel: "stable", At: f.now}, 0o644) |
| f.edgeUp = false // never comes up, on either binary |
| @@ -1104,6 +1106,7 @@ func TestRecoveryAnswersTheJournalsVersionNotALaterRequest(t *testing.T) { |
| } |
| func TestRecoveryAnswersTheInterruptedPromoteNotTheRePromote(t *testing.T) { |
| + t.Parallel() |
| // v2 was interrupted; the operator re-promoted the same v2. The |
| // recovery's result must name the promote it recovered, or the retry |
| // arrives at a box that has already recorded it as rolled back. |
| @@ -1588,6 +1591,7 @@ func TestApplyInstallsAPostLayoutCandidateOverNestedRows(t *testing.T) { |
| // This is the box's own line of defence against `carlos system update |
| // --file`, which the console's guard does not judge. Flat rows let it in. |
| func TestApplyRefusesAMountedButBelowFloorCandidateOverANestedRow(t *testing.T) { |
| + t.Parallel() |
| for _, tc := range []struct { |
| name string |
| rows []registry.Route |
| @@ -1839,6 +1843,7 @@ func TestBootRecoveryUsesTheArmedFloorOffline(t *testing.T) { |
| // is written. The proof of "before": region HA defers this install at the |
| // step just ahead of the journal, and the two files are already there. |
| func TestDecidePrevWritesTheSidecarAndVerdictBeforeTheJournal(t *testing.T) { |
| + t.Parallel() |
| for _, tc := range []struct { |
| name, running string |
| held, verdict bool |
| @@ -2258,6 +2263,7 @@ func TestFirstFloorArmedDuringStagingRefusesTheRename(t *testing.T) { |
| // even on a box with no floor yet (it creates .moves for it), so the agent's |
| // first arming waits until the rename is done and cannot slip in between. |
| func TestFirstArmingWaitsForTheActivationLock(t *testing.T) { |
| + t.Parallel() |
| f, _ := floorFixture(t, "v0.31.0", "v0.32.0") |
| armed := make(chan error, 1) |
| f.a.beforeSwap = func() { |
diff --git a/internal/host/systemparticipation_test.go b/internal/host/systemparticipation_test.go| index 90731379a..ecdd03b7d 100644 |
| --- a/internal/host/systemparticipation_test.go |
| +++ b/internal/host/systemparticipation_test.go |
| @@ -43,6 +43,7 @@ func assertNotUpdated(t *testing.T, f *applyFixture, why string) { |
| // Spec §5.10: any controller record, in any state, refuses the update. |
| func TestApplyRefusesWhileThisBoxTakesPartInAClaimOperation(t *testing.T) { |
| + t.Parallel() |
| for _, state := range []string{"pending", "active", "lost"} { |
| t.Run(state, func(t *testing.T) { |
| f, _ := applyHappy(t) |
| @@ -58,6 +59,7 @@ func TestApplyRefusesWhileThisBoxTakesPartInAClaimOperation(t *testing.T) { |
| // Review Focus 4: what root cannot read is a refusal, never a pass. |
| func TestApplyRefusesWhenItCannotTellWhetherThisBoxTakesPart(t *testing.T) { |
| + t.Parallel() |
| cases := map[string]func(t *testing.T, f *applyFixture){ |
| "a temporary file": func(t *testing.T, f *applyFixture) { |
| os.WriteFile(filepath.Join(hostexec(t, f), ".shop.bab.test.json.tmp"), nil, 0o600) |