Skip to content

test: wizard/preflight specs leak temp dirs under /tmp (Story342–346, gh332, pawire) — ~60k dirs / ~500k inodes in a week #710

Description

@genwave-radio

🐛 What

The installer/preflight specs create scratch directories with Directory.CreateTempSubdirectory("gw-…") and never delete them. On a dev box with a tmpfs /tmp (1,048,576-inode budget) a week of test runs left 59,973 gw-setup-story34* / gw-preflight-story342-* dirs (each a fixture checkout of 58 files) — about 500k inodes. Combined with one scratch copy of the repo, /tmp hit 100% inodes and every tool on the box failed with ENOSPC: no space left on device.

Census after cleanup (still leaking, smaller): gw-preflight-bin-* ×1840, genwave-pawire-* ×917, story343-env-* ×916, gw-preflight-env-* ×462, gh332-{bin,env,log}-* ×153 each.

📍 Where

  • tests/GenWave.Host.Tests/Specs/Story342_PreflightExpansion.cs:59,96,116,477,490,506,568,591,609
  • tests/GenWave.Host.Tests/Specs/Story346_AdoptionVerifyRepair.cs:85,115,163,328,439,868,1107,1132,1202
  • Story343/344/345 specs (gw-setup-story344-*, gw-setup-story345-*, story343-env-*), the gh332 spec, and whichever spec uses the genwave-pawire- prefix — same pattern.

✅ Fix shape

One TempDir : IDisposable helper in the Host test project (create in ctor, Directory.Delete(path, recursive: true) in Dispose, swallow IOException), used via using var at every call site. Optionally an xUnit collection fixture that sweeps Path.GetTempPath()/gw-* older than an hour at startup so stale runs self-heal.

🧪 Acceptance

ls /tmp | grep -c '^gw-' is unchanged before/after dotnet test --filter FullyQualifiedName~Story346.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions