diff options
author | Joseph Myers <joseph@codesourcery.com> | 2015-10-15 22:29:06 +0000 |
---|---|---|
committer | Joseph Myers <joseph@codesourcery.com> | 2015-10-15 22:29:06 +0000 |
commit | cf1455657ec916ecd78c9d2c3bcbbf6608e6c158 (patch) | |
tree | 1d4531f5a4a24d528219dd68e4a93ecd1ec7e184 /nptl/tst-sem11-static.c | |
parent | fadd2ad9cc36115440d50b0eae9299e65988917d (diff) | |
download | glibc-cf1455657ec916ecd78c9d2c3bcbbf6608e6c158.zip glibc-cf1455657ec916ecd78c9d2c3bcbbf6608e6c158.tar.gz glibc-cf1455657ec916ecd78c9d2c3bcbbf6608e6c158.tar.bz2 |
Do not leave files behind in /tmp from testing.
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.
Tested for x86_64 (that the files are no longer left behind by a
testsuite run and the modified tests still pass).
* io/test-lfs.c (do_prepare): Do not call add_temp_file until
after mkstemp64.
* login/tst-utmp.c (do_prepare): Likewise.
* rt/tst-aio.c (do_prepare): Likewise.
* rt/tst-aio64.c (do_prepare): Likewise.
Diffstat (limited to 'nptl/tst-sem11-static.c')
0 files changed, 0 insertions, 0 deletions