You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit e74fab1
Browse filesBrowse the repository at this point in the historyBrowse files
tests: stop leaking temporary directories into /tmp
Reported as the machine filling its RAM. It was these: on that machine
/tmp is a tmpfs, so every directory left behind is memory that never
comes back, and free's "shared" column moved by the same 2.3 GB that
deleting them recovered.
Three scripts created a workspace per run, or per case, and removed
none of it:
tests/verify/run_tests.py one for the dialog build, one for the
testrt oracle, and ONE PER FIXTURE for
the code oracle -- each holding a real
Gaussian scratch directory
tests/parsers/run_tests.py one per case, 1542 of them
tools/modiagram/frommopac.py one per invocation, 749 of them
Together, 252 directories holding 2.0 GB, plus eight and a half
thousand smaller ones. A suite that eats the machine it runs on gets
turned off, which costs more than the leak.
Each now registers its own cleanup at exit, so an early return or a
failed assertion cannot skip it. tests/symmetry, tests/e2e,
tests/dialogs and tests/parsers/expt.py already removed theirs.
Verified by running every suite back to back: nine temp entries
before, nine after.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EFMUNbw2UpRPmgsqviAowb
0 commit comments