sizes: the reused-generation witness checks the running unit carries no stale control drop-in
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 file changed,
+15
−0
internal/host/size_rootrunner_linux_test.go+15 −0
diff --git a/internal/host/size_rootrunner_linux_test.go b/internal/host/size_rootrunner_linux_test.go| index 85628dde5..819a496ad 100644 |
| --- a/internal/host/size_rootrunner_linux_test.go |
| +++ b/internal/host/size_rootrunner_linux_test.go |
| @@ -548,6 +548,21 @@ func TestReusedGenerationNumberStartsAtItsOwnSizeRootRunner(t *testing.T) { |
| b.tenant(t, unit, "gen.sock") |
| wantGenMemory(t, step, unit, sizeStandard) |
| wantSliceRow(t, step, b.slice, sizeStandard) |
| + // The running reused generation carries no control drop-in with |
| + // the old growth's memory: the start cleared it. |
| + if entries, err := os.ReadDir(control); err == nil { |
| + for _, e := range entries { |
| + raw, err := os.ReadFile(filepath.Join(control, e.Name())) |
| + if err != nil { |
| + t.Fatal(err) |
| + } |
| + if strings.Contains(string(raw), "MemoryMax="+sizeXLarge.max) { |
| + t.Fatalf("%s: %s still holds the old growth's MemoryMax=%s", step, filepath.Join(control, e.Name()), sizeXLarge.max) |
| + } |
| + } |
| + } else if !errors.Is(err, fs.ErrNotExist) { |
| + t.Fatal(err) |
| + } |
| if err := b.client.StopGen(ctx, b.host, egressGen, false); err != nil { |
| t.Fatal(step, "stop gen:", err) |
| } |