From a07d71274a7d7a6fda8baf9f63fd38f6ed0ffe1b Mon Sep 17 00:00:00 2001 From: Patrick Pelissier Date: Wed, 25 Oct 2017 21:46:54 +0200 Subject: [PATCH] Fix issue with massive parallele check --- tests/Makefile | 2 +- tests/test-marray.c | 8 ++++---- tests/test-mbitset.c | 4 ++-- tests/test-mdict.c | 4 ++-- tests/test-mlist.c | 4 ++-- tests/test-mrbtree.c | 8 ++++---- tests/test-mstring.c | 16 ++++++++-------- tests/test-mtuple.c | 4 ++-- tests/test-mvariant.c | 8 ++++---- 9 files changed, 29 insertions(+), 29 deletions(-) diff --git a/tests/Makefile b/tests/Makefile index 98443adb..3e95a205 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -57,7 +57,7 @@ check: depend $(MAKE) `ls test-*.c|sed -e 's/\.c/\.log/g'` clean: - $(RM) *.exe *.s *~ *.o *.log *.valgrind ./a.dat clang_output_* *.c.c *.end.c *.first.c *.middle.c + $(RM) *.exe *.s *~ *.o *.log *.valgrind ./a*.dat clang_output_* *.c.c *.end.c *.first.c *.middle.c $(RM) -rf coverage *.gcda *.gcno *.gcov all.info test.tar coverage-dir mlib-report distclean: clean diff --git a/tests/test-marray.c b/tests/test-marray.c index f1e90f3d..479da693 100644 --- a/tests/test-marray.c +++ b/tests/test-marray.c @@ -177,12 +177,12 @@ static void test_mpz(void) mpz_init (z); // Test empty - FILE *f = fopen ("a.dat", "wt"); + FILE *f = fopen ("a-marray.dat", "wt"); if (!f) abort(); array_mpz_out_str(f, array1); fclose (f); - f = fopen ("a.dat", "rt"); + f = fopen ("a-marray.dat", "rt"); if (!f) abort(); bool b = array_mpz_in_str (array2, f); assert (b == true); @@ -195,12 +195,12 @@ static void test_mpz(void) array_mpz_push_back (array1, z); } - f = fopen ("a.dat", "wt"); + f = fopen ("a-marray.dat", "wt"); if (!f) abort(); array_mpz_out_str(f, array1); fclose (f); - f = fopen ("a.dat", "rt"); + f = fopen ("a-marray.dat", "rt"); if (!f) abort(); b = array_mpz_in_str (array2, f); assert (b == true); diff --git a/tests/test-mbitset.c b/tests/test-mbitset.c index d7bd76b4..7775bfeb 100644 --- a/tests/test-mbitset.c +++ b/tests/test-mbitset.c @@ -192,12 +192,12 @@ static void test_str(void) for(int i = 0; i < 200; i++) bitset_push_back(set1, (i*17547854547UL >> 4)&1) ; - FILE *f = fopen ("a.dat", "wt"); + FILE *f = fopen ("a-mbitset.dat", "wt"); if (!f) abort(); bitset_out_str(f, set1); fclose (f); - f = fopen ("a.dat", "rt"); + f = fopen ("a-mbitset.dat", "rt"); if (!f) abort(); bool b = bitset_in_str (set2, f); assert (b == true); diff --git a/tests/test-mdict.c b/tests/test-mdict.c index b725838a..1786f1ff 100644 --- a/tests/test-mdict.c +++ b/tests/test-mdict.c @@ -102,11 +102,11 @@ static void check_io(void) dict_str_get_str(str, dict, false); //NOTE: order is dependent on the hash system. assert (string_cmp_str (str, "{\"LICENCE\":\"BSD3\",\"AUTHOR\":\"PP\"}") == 0 || string_cmp_str (str, "{\"AUTHOR\":\"PP\",\"LICENCE\":\"BSD3\"}") == 0); - FILE *f = fopen ("a.dat", "wt"); + FILE *f = fopen ("a-mdict.dat", "wt"); if (!f) abort(); dict_str_out_str(f, dict); fclose (f); - f = fopen ("a.dat", "rt"); + f = fopen ("a-mdict.dat", "rt"); if (!f) abort(); M_LET(dict2, DICT_OPLIST(dict_str)) { bool b = dict_str_in_str(dict2, f); diff --git a/tests/test-mlist.c b/tests/test-mlist.c index 15fb9045..a43251dc 100644 --- a/tests/test-mlist.c +++ b/tests/test-mlist.c @@ -242,14 +242,14 @@ static void test_mpz(void) } assert (mpz_get_ui(s) == 1000*999/2); - FILE *f = fopen ("a.dat", "wt"); + FILE *f = fopen ("a-mlist.dat", "wt"); if (!f) abort(); list_mpz_out_str(f, v); fclose (f); list_mpz_t list2; list_mpz_init(list2); - f = fopen ("a.dat", "rt"); + f = fopen ("a-mlist.dat", "rt"); bool b = list_mpz_in_str (list2, f); assert (b == true); fclose(f); diff --git a/tests/test-mrbtree.c b/tests/test-mrbtree.c index 1293948f..2b9ec4e8 100644 --- a/tests/test-mrbtree.c +++ b/tests/test-mrbtree.c @@ -132,12 +132,12 @@ static void test_io(void) M_LET(str, STRING_OPLIST) M_LET(tree1, tree2, UINT_OPLIST) { // Empty one - FILE *f = fopen ("a.dat", "wt"); + FILE *f = fopen ("a-mrbtree.dat", "wt"); if (!f) abort(); rbtree_uint_out_str(f, tree1); fclose (f); - f = fopen ("a.dat", "rt"); + f = fopen ("a-mrbtree.dat", "rt"); if (!f) abort(); bool b = rbtree_uint_in_str (tree2, f); assert (b == true); @@ -151,12 +151,12 @@ static void test_io(void) for(unsigned int i = 0 ; i < 10; i++) rbtree_uint_push(tree1, i); - f = fopen ("a.dat", "wt"); + f = fopen ("a-mrbtree.dat", "wt"); if (!f) abort(); rbtree_uint_out_str(f, tree1); fclose (f); - f = fopen ("a.dat", "rt"); + f = fopen ("a-mrbtree.dat", "rt"); if (!f) abort(); b = rbtree_uint_in_str (tree2, f); assert (b == true); diff --git a/tests/test-mstring.c b/tests/test-mstring.c index 32f879d0..f3c028bb 100644 --- a/tests/test-mstring.c +++ b/tests/test-mstring.c @@ -201,11 +201,11 @@ int main(void) assert (string_cmp_str (s2, "\"Hello world\"\"Hello \\\"world\\\"\"") == 0); string_set_str(s1, "Hello \"world\""); - FILE *f = fopen ("a.dat", "wt"); + FILE *f = fopen ("a-mstring.dat", "wt"); assert (f != NULL); string_out_str (f, s1); fclose (f); - f = fopen("a.dat", "rt"); + f = fopen("a-mstring.dat", "rt"); assert (f != NULL); b = string_in_str(s2, f); assert(b); @@ -267,11 +267,11 @@ int main(void) string_printf (s1, "Hello %d worlds. How do you do? I'm fine. Thank you! The weather is bad today. I should had brought my umbrella. Oh! You can lend me one! Thank you very much! No really thank you. I wouldn't be able to get in time for my job.", 2); assert (string_equal_str_p(s1, "Hello 2 worlds. How do you do? I'm fine. Thank you! The weather is bad today. I should had brought my umbrella. Oh! You can lend me one! Thank you very much! No really thank you. I wouldn't be able to get in time for my job.")); - f = fopen ("a.dat", "wt"); + f = fopen ("a-mstring.dat", "wt"); assert (f != NULL); string_fputs (f, s1); fclose (f); - f = fopen("a.dat", "rt"); + f = fopen("a-mstring.dat", "rt"); assert (f != NULL); string_fgets(s2, f, STRING_READ_FILE); fclose(f); @@ -281,12 +281,12 @@ int main(void) string_init(s2); string_set_str(s2, "I'm ok"); - f = fopen ("a.dat", "wt"); + f = fopen ("a-mstring.dat", "wt"); assert (f != NULL); string_fputs (f, s1); fprintf (f, "\n"); fclose (f); - f = fopen("a.dat", "rt"); + f = fopen("a-mstring.dat", "rt"); assert (f != NULL); string_fgets(s2, f, STRING_READ_PURE_LINE); fclose(f); @@ -294,11 +294,11 @@ int main(void) string_clear(s1); string_init(s1); - f = fopen("a.dat", "wt"); + f = fopen("a-mstring.dat", "wt"); assert(f != NULL); fprintf(f, "hello world.\n\tHowwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww do you do?"); fclose(f); - f = fopen("a.dat", "rt"); + f = fopen("a-mstring.dat", "rt"); b = string_fget_word(s1, " \t.\n?", f); assert(b); assert(string_equal_str_p(s1, "hello")); diff --git a/tests/test-mtuple.c b/tests/test-mtuple.c index e53992ae..2fcbe713 100644 --- a/tests/test-mtuple.c +++ b/tests/test-mtuple.c @@ -78,12 +78,12 @@ static void check_io(void) pair_str_get_str(s, pair, false); assert(string_cmp_str(s, "(\"Hello\",\"World\")") == 0); - FILE *f = fopen("a.dat", "wt"); + FILE *f = fopen("a-mtuple.dat", "wt"); if (!f) abort(); pair_str_out_str(f, pair); fclose(f); - f = fopen("a.dat", "rt"); + f = fopen("a-mtuple.dat", "rt"); if (!f) abort(); bool b = pair_str_in_str(pair2, f); assert (b); diff --git a/tests/test-mvariant.c b/tests/test-mvariant.c index 50fe64e5..91b0c333 100644 --- a/tests/test-mvariant.c +++ b/tests/test-mvariant.c @@ -139,12 +139,12 @@ test_io(void) M_LET(s, STRING_OPLIST) M_LET(x, y, VARIANT_OPLIST(single, STRING_OPLIST)) { // Check empty - FILE *f = fopen ("a.dat", "wt"); + FILE *f = fopen ("a-mvariant.dat", "wt"); if (!f) abort(); single_out_str(f, x); fclose (f); - f = fopen ("a.dat", "rt"); + f = fopen ("a-mvariant.dat", "rt"); bool b = single_in_str (y, f); assert (b == true); fclose(f); @@ -156,12 +156,12 @@ test_io(void) // Fill in the variant single_set_s (x, s); - f = fopen ("a.dat", "wt"); + f = fopen ("a-mvariant.dat", "wt"); if (!f) abort(); single_out_str(f, x); fclose (f); - f = fopen ("a.dat", "rt"); + f = fopen ("a-mvariant.dat", "rt"); b = single_in_str (y, f); assert (b == true); fclose(f);