Last modified: 2012-07-18 15:50:56 UTC
/tmp on gallium keeps getting filled up with junk because tests aren't cleaning up after themselves. Running MediaWiki-sqlite-phpunit && MediaWiki-postgres-phpunit suites *once* takes leaves /tmp with ~43M more data spread across ~1560 directories. After a couple of runs, /tmp ends up with 32000+ directories and jenkins craps out. Tests should clean their messes up after themselves. Aaron: you said this was better but obviously not so I added you to cc :)
It should be better for the two test I worked on. I didn't say anything about the other tests :D
We talked about that with Platonides some days ago. A possible way would be to create a temporary file repository for each test and have it destroy itself automatically through a __destructor call. Still need to figure out how to create a FileRepo object though :-D
This seems to be much better since a few days ago :) Current status of gallium: * exif tests are still leaking, although they use way less directories than the filerepo tests so it's not as urgent * Something (filerepo?) is leaving various *.png, *.jpg files behind * Something is leaving files behind named /randomfile![0-9]{19}.txt/ * Also some txt files called "unittests_{git-looking-hash}-1.txt" are being left too Other than that, much much better!
I have started enhancing the test suite to use TempFSFile (a self destructing filesystem).
I have attempted again a temp filesystem but that does not work that well. Ended up hacking in. Leaks in trunk with r112327 r112352 Merged back to REL1_19 with r112354 Still have to cleanup the "new" parser tests leakages.
Just checked again on gallium. After 4 weeks, there is just some mwParser and exif-test directories.
Christian Aistleitner factored a nice interface in MediaWikiTestCase which offer temp file and temp directory that self destruct. https://gerrit.wikimedia.org/r/4637
*** Bug 37252 has been marked as a duplicate of this bug. ***
Seems to be not fixed 100% per the dupe.
(In reply to comment #9) > Seems to be not fixed 100% per the dupe. FAILURES! FileBackendTest::testRecursiveClean Dir mwstore://localtesting/unittest-cont1/a no longer exists (FSFileBackend). Failed asserting that true matches expected false. \tests\phpunit\includes\filerepo\FileBackendTest.php:1121 \tests\phpunit\includes\filerepo\FileBackendTest.php:1075 \tests\phpunit\MediaWikiTestCase.php:79 \tests\phpunit\MediaWikiPHPUnitCommand.php:45 \tests\phpunit\phpunit.php:103 On an windows machine
Getting "Permission denied" but dir is empty, when trying to remove it. Looks like someone is still having a handler open on that dir (maybe php bug 42948?)
reclosing. Better to just open a new bug. Dupe bug 37252 fixed.