Do not leave files behind in /tmp from testing

Joseph Myers joseph@codesourcery.com
Thu Oct 15 22:11:00 GMT 2015


On Thu, 15 Oct 2015, Roland McGrath wrote:

> If the test exits abnormally, then it won't call delete_temp_files at all.
> In the normal case, the parent is there to catch the dying child and do
> appropriate cleanup, so it matters that the parent's delete_temp_files
> cover everything that the child's would have.  (I acknowledge that this
> matters less if it's not an EXPECTED_SIGNAL case, since /tmp turds left on
> failures are less of a concern.)  The TEST_DIRECT case is similar in
> effect: the cleanup on abnormal exit is handled by the wrapper script,
> which needs to be instructed between PREPARE and TEST_FUNCTION.

I still don't see what this has to do with my patch.  It may be a case for 
a general review of where tests create and register temporary files to be 
entered on the wiki todo list.  But the add_temp_file call that my patch 
moves could never have done anything useful before (because it registered 
the wrong name) - so I don't see how my patch could regress anything that 
worked before (and in the case of normal termination, my patch should fix 
things whether or not TEST_DIRECT applies).

-- 
Joseph S. Myers
joseph@codesourcery.com



More information about the Libc-alpha mailing list