This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Do not leave files behind in /tmp from testing


* Joseph Myers:

> I noticed that glibc testsuite runs left several files behind in /tmp
> (or TMPDIR, if different).  The problem was testcases that generate a
> template for mkstemp / mkstemp64, ending with XXXXXX, then pass that
> template to add_temp_file before calling mkstemp / mkstemp64, meaning
> that the template ending with XXXXXX is stored in the list of
> temporary files to delete (add_temp_file uses strdup so that the
> original string doesn't need to stay live), not the actual filename as
> determined by mkstemp / mkstemp64.  This patch fixes those tests to
> call add_temp_file later.

Oops, I think I broken this while fixing the memory leak in the test
driver.

> Tested for x86_64 (that the files are no longer left behind by a
> testsuite run and the modified tests still pass).
>
> 2015-10-15  Joseph Myers  <joseph@codesourcery.com>
>
> 	* io/test-lfs.c (do_prepare): Do not call add_temp_file until
> 	after mkstemp64.
> 	* io/tst-fcntl.c (do_prepare): Do not call add_temp_file here.
> 	(do_test): Call add_temp_file here instead.
> 	* login/tst-utmp.c (do_prepare): Do not call add_temp_file until
> 	after mkstemp.
> 	* rt/tst-aio.c (do_prepare): Likewise.
> 	* rt/tst-aio64.c (do_prepare): Likewise.

Okay.

Thanks,
Florian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]