diff options
author | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2017-09-05 11:40:33 +0000 |
---|---|---|
committer | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2017-09-05 11:40:33 +0000 |
commit | 3f968b48c0f990bf760a5737e0ff2aa54f7e2ea9 (patch) | |
tree | 20313cb69ee0a1d24920775314f28bf3ce2d40db | |
parent | e0b8fc84dbeed6c08b64ddbf4c5728d8b26205c5 (diff) | |
download | mpfr-3f968b48c0f990bf760a5737e0ff2aa54f7e2ea9.tar.gz |
[tests]
* tfprintf.c, tout_str.c, tprintf.c: Do not use the same filename
for result files created in these test programs, as this may break
parallel tests.
* toutimpl.c: Changed the filename of the result file like what
has been done in other test programs, to make sure that it will
not be reused by mistake. Removed comments about tmpname (which
does not exist).
* Makefile.am: added a CLEANFILES line with these files.
(merged changesets r11698-11699 from the trunk)
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/3.1@11703 280ebfd0-de03-0410-8827-d642c229c3f4
-rw-r--r-- | tests/Makefile.am | 2 | ||||
-rw-r--r-- | tests/tfprintf.c | 2 | ||||
-rw-r--r-- | tests/tout_str.c | 2 | ||||
-rw-r--r-- | tests/toutimpl.c | 8 | ||||
-rw-r--r-- | tests/tprintf.c | 2 |
5 files changed, 7 insertions, 9 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am index 636a3a8b1..b306f1459 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -49,6 +49,8 @@ AM_CPPFLAGS = -DSRCDIR='"$(srcdir)"' EXTRA_DIST = tgeneric.c tgeneric_ui.c mpf_compat.h inp_str.data tmul.dat +CLEANFILES = tfprintf_out.txt tout_str_out.txt toutimpl_out.txt tprintf_out.txt + LDADD = libfrtests.la $(MPFR_LIBM) $(top_builddir)/src/libmpfr.la AM_CPPFLAGS += -I$(top_srcdir)/src -I$(top_builddir)/src diff --git a/tests/tfprintf.c b/tests/tfprintf.c index 4ec516f0c..bde1dd044 100644 --- a/tests/tfprintf.c +++ b/tests/tfprintf.c @@ -396,7 +396,7 @@ main (int argc, char *argv[]) /* If we failed to open this device, try with a dummy file */ if (fout == NULL) { - fout = fopen ("mpfrtest.txt", "w"); + fout = fopen ("tfprintf_out.txt", "w"); if (fout == NULL) { diff --git a/tests/tout_str.c b/tests/tout_str.c index 61b42b1cc..f0e9400e4 100644 --- a/tests/tout_str.c +++ b/tests/tout_str.c @@ -114,7 +114,7 @@ main (int argc, char *argv[]) fout = fopen ("/dev/null", "w"); /* If we failed to open this device, try with a dummy file */ if (fout == NULL) - fout = fopen ("mpfrtest.txt", "w"); + fout = fopen ("tout_str_out.txt", "w"); } else { diff --git a/tests/toutimpl.c b/tests/toutimpl.c index f683330df..59074974f 100644 --- a/tests/toutimpl.c +++ b/tests/toutimpl.c @@ -24,10 +24,7 @@ http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., #include <stdlib.h> #include "mpfr-test.h" -/* We output stdout to a file to check if it is correct - Is it a good idea? - We can't use tmpname since it is insecure */ -#define FILE_NAME "dummy.tmp" +#define FILE_NAME "toutimpl_out.txt" static const char Buffer[] = "@NaN@\n" @@ -72,8 +69,7 @@ main (void) exit (1); } - /* Reopen stdout to a file. All errors will be put to stderr - Can't use tmpname since it is unsecure */ + /* Reopen stdout to a file. All errors will be put to stderr. */ if (freopen (FILE_NAME, "w", stdout) == NULL) { printf ("Error can't redirect stdout\n"); diff --git a/tests/tprintf.c b/tests/tprintf.c index b5f71a23d..96b6dc816 100644 --- a/tests/tprintf.c +++ b/tests/tprintf.c @@ -475,7 +475,7 @@ main (int argc, char *argv[]) if (freopen ("/dev/null", "w", stdout) == NULL) { /* We failed to open this device, try with a dummy file */ - if (freopen ("mpfrtest.txt", "w", stdout) == NULL) + if (freopen ("tprintf_out.txt", "w", stdout) == NULL) { /* Output the error message to stderr since it is not a message about a wrong result in MPFR. Anyway the |