Fix issue with massive parallele check

This commit is contained in:
Patrick Pelissier committed 2017-10-25 21:46:54 +02:00
1 parent cefa0ac589
commit a07d71274a
9 files changed
+29 -29

No files matched your search

+1 -1
View File
@@ -57,7 +57,7 @@ check: depend
$(MAKE) `ls test-*.c|sed -e 's/\.c/\.log/g'` $(MAKE) `ls test-*.c|sed -e 's/\.c/\.log/g'`
clean: 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 $(RM) -rf coverage *.gcda *.gcno *.gcov all.info test.tar coverage-dir mlib-report
distclean: clean distclean: clean
+4 -4
View File
@@ -177,12 +177,12 @@ static void test_mpz(void)
mpz_init (z); mpz_init (z);
// Test empty // Test empty
FILE *f = fopen ("a.dat", "wt"); FILE *f = fopen ("a-marray.dat", "wt");
if (!f) abort(); if (!f) abort();
array_mpz_out_str(f, array1); array_mpz_out_str(f, array1);
fclose (f); fclose (f);
f = fopen ("a.dat", "rt"); f = fopen ("a-marray.dat", "rt");
if (!f) abort(); if (!f) abort();
bool b = array_mpz_in_str (array2, f); bool b = array_mpz_in_str (array2, f);
assert (b == true); assert (b == true);
@@ -195,12 +195,12 @@ static void test_mpz(void)
array_mpz_push_back (array1, z); array_mpz_push_back (array1, z);
} }
f = fopen ("a.dat", "wt"); f = fopen ("a-marray.dat", "wt");
if (!f) abort(); if (!f) abort();
array_mpz_out_str(f, array1); array_mpz_out_str(f, array1);
fclose (f); fclose (f);
f = fopen ("a.dat", "rt"); f = fopen ("a-marray.dat", "rt");
if (!f) abort(); if (!f) abort();
b = array_mpz_in_str (array2, f); b = array_mpz_in_str (array2, f);
assert (b == true); assert (b == true);
+2 -2
View File
@@ -192,12 +192,12 @@ static void test_str(void)
for(int i = 0; i < 200; i++) for(int i = 0; i < 200; i++)
bitset_push_back(set1, (i*17547854547UL >> 4)&1) ; bitset_push_back(set1, (i*17547854547UL >> 4)&1) ;
FILE *f = fopen ("a.dat", "wt"); FILE *f = fopen ("a-mbitset.dat", "wt");
if (!f) abort(); if (!f) abort();
bitset_out_str(f, set1); bitset_out_str(f, set1);
fclose (f); fclose (f);
f = fopen ("a.dat", "rt"); f = fopen ("a-mbitset.dat", "rt");
if (!f) abort(); if (!f) abort();
bool b = bitset_in_str (set2, f); bool b = bitset_in_str (set2, f);
assert (b == true); assert (b == true);
+2 -2
View File
@@ -102,11 +102,11 @@ static void check_io(void)
dict_str_get_str(str, dict, false); dict_str_get_str(str, dict, false);
//NOTE: order is dependent on the hash system. //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); 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(); if (!f) abort();
dict_str_out_str(f, dict); dict_str_out_str(f, dict);
fclose (f); fclose (f);
f = fopen ("a.dat", "rt"); f = fopen ("a-mdict.dat", "rt");
if (!f) abort(); if (!f) abort();
M_LET(dict2, DICT_OPLIST(dict_str)) { M_LET(dict2, DICT_OPLIST(dict_str)) {
bool b = dict_str_in_str(dict2, f); bool b = dict_str_in_str(dict2, f);
+2 -2
View File
@@ -242,14 +242,14 @@ static void test_mpz(void)
} }
assert (mpz_get_ui(s) == 1000*999/2); assert (mpz_get_ui(s) == 1000*999/2);
FILE *f = fopen ("a.dat", "wt"); FILE *f = fopen ("a-mlist.dat", "wt");
if (!f) abort(); if (!f) abort();
list_mpz_out_str(f, v); list_mpz_out_str(f, v);
fclose (f); fclose (f);
list_mpz_t list2; list_mpz_t list2;
list_mpz_init(list2); list_mpz_init(list2);
f = fopen ("a.dat", "rt"); f = fopen ("a-mlist.dat", "rt");
bool b = list_mpz_in_str (list2, f); bool b = list_mpz_in_str (list2, f);
assert (b == true); assert (b == true);
fclose(f); fclose(f);
+4 -4
View File
@@ -132,12 +132,12 @@ static void test_io(void)
M_LET(str, STRING_OPLIST) M_LET(str, STRING_OPLIST)
M_LET(tree1, tree2, UINT_OPLIST) { M_LET(tree1, tree2, UINT_OPLIST) {
// Empty one // Empty one
FILE *f = fopen ("a.dat", "wt"); FILE *f = fopen ("a-mrbtree.dat", "wt");
if (!f) abort(); if (!f) abort();
rbtree_uint_out_str(f, tree1); rbtree_uint_out_str(f, tree1);
fclose (f); fclose (f);
f = fopen ("a.dat", "rt"); f = fopen ("a-mrbtree.dat", "rt");
if (!f) abort(); if (!f) abort();
bool b = rbtree_uint_in_str (tree2, f); bool b = rbtree_uint_in_str (tree2, f);
assert (b == true); assert (b == true);
@@ -151,12 +151,12 @@ static void test_io(void)
for(unsigned int i = 0 ; i < 10; i++) for(unsigned int i = 0 ; i < 10; i++)
rbtree_uint_push(tree1, i); rbtree_uint_push(tree1, i);
f = fopen ("a.dat", "wt"); f = fopen ("a-mrbtree.dat", "wt");
if (!f) abort(); if (!f) abort();
rbtree_uint_out_str(f, tree1); rbtree_uint_out_str(f, tree1);
fclose (f); fclose (f);
f = fopen ("a.dat", "rt"); f = fopen ("a-mrbtree.dat", "rt");
if (!f) abort(); if (!f) abort();
b = rbtree_uint_in_str (tree2, f); b = rbtree_uint_in_str (tree2, f);
assert (b == true); assert (b == true);
+8 -8
View File
@@ -201,11 +201,11 @@ int main(void)
assert (string_cmp_str (s2, "\"Hello world\"\"Hello \\\"world\\\"\"") == 0); assert (string_cmp_str (s2, "\"Hello world\"\"Hello \\\"world\\\"\"") == 0);
string_set_str(s1, "Hello \"world\""); string_set_str(s1, "Hello \"world\"");
FILE *f = fopen ("a.dat", "wt"); FILE *f = fopen ("a-mstring.dat", "wt");
assert (f != NULL); assert (f != NULL);
string_out_str (f, s1); string_out_str (f, s1);
fclose (f); fclose (f);
f = fopen("a.dat", "rt"); f = fopen("a-mstring.dat", "rt");
assert (f != NULL); assert (f != NULL);
b = string_in_str(s2, f); b = string_in_str(s2, f);
assert(b); 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); 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.")); 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); assert (f != NULL);
string_fputs (f, s1); string_fputs (f, s1);
fclose (f); fclose (f);
f = fopen("a.dat", "rt"); f = fopen("a-mstring.dat", "rt");
assert (f != NULL); assert (f != NULL);
string_fgets(s2, f, STRING_READ_FILE); string_fgets(s2, f, STRING_READ_FILE);
fclose(f); fclose(f);
@@ -281,12 +281,12 @@ int main(void)
string_init(s2); string_init(s2);
string_set_str(s2, "I'm ok"); string_set_str(s2, "I'm ok");
f = fopen ("a.dat", "wt"); f = fopen ("a-mstring.dat", "wt");
assert (f != NULL); assert (f != NULL);
string_fputs (f, s1); string_fputs (f, s1);
fprintf (f, "\n"); fprintf (f, "\n");
fclose (f); fclose (f);
f = fopen("a.dat", "rt"); f = fopen("a-mstring.dat", "rt");
assert (f != NULL); assert (f != NULL);
string_fgets(s2, f, STRING_READ_PURE_LINE); string_fgets(s2, f, STRING_READ_PURE_LINE);
fclose(f); fclose(f);
@@ -294,11 +294,11 @@ int main(void)
string_clear(s1); string_clear(s1);
string_init(s1); string_init(s1);
f = fopen("a.dat", "wt"); f = fopen("a-mstring.dat", "wt");
assert(f != NULL); assert(f != NULL);
fprintf(f, "hello world.\n\tHowwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww do you do?"); fprintf(f, "hello world.\n\tHowwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww do you do?");
fclose(f); fclose(f);
f = fopen("a.dat", "rt"); f = fopen("a-mstring.dat", "rt");
b = string_fget_word(s1, " \t.\n?", f); b = string_fget_word(s1, " \t.\n?", f);
assert(b); assert(b);
assert(string_equal_str_p(s1, "hello")); assert(string_equal_str_p(s1, "hello"));
+2 -2
View File
@@ -78,12 +78,12 @@ static void check_io(void)
pair_str_get_str(s, pair, false); pair_str_get_str(s, pair, false);
assert(string_cmp_str(s, "(\"Hello\",\"World\")") == 0); assert(string_cmp_str(s, "(\"Hello\",\"World\")") == 0);
FILE *f = fopen("a.dat", "wt"); FILE *f = fopen("a-mtuple.dat", "wt");
if (!f) abort(); if (!f) abort();
pair_str_out_str(f, pair); pair_str_out_str(f, pair);
fclose(f); fclose(f);
f = fopen("a.dat", "rt"); f = fopen("a-mtuple.dat", "rt");
if (!f) abort(); if (!f) abort();
bool b = pair_str_in_str(pair2, f); bool b = pair_str_in_str(pair2, f);
assert (b); assert (b);
+4 -4
View File
@@ -139,12 +139,12 @@ test_io(void)
M_LET(s, STRING_OPLIST) M_LET(s, STRING_OPLIST)
M_LET(x, y, VARIANT_OPLIST(single, STRING_OPLIST)) { M_LET(x, y, VARIANT_OPLIST(single, STRING_OPLIST)) {
// Check empty // Check empty
FILE *f = fopen ("a.dat", "wt"); FILE *f = fopen ("a-mvariant.dat", "wt");
if (!f) abort(); if (!f) abort();
single_out_str(f, x); single_out_str(f, x);
fclose (f); fclose (f);
f = fopen ("a.dat", "rt"); f = fopen ("a-mvariant.dat", "rt");
bool b = single_in_str (y, f); bool b = single_in_str (y, f);
assert (b == true); assert (b == true);
fclose(f); fclose(f);
@@ -156,12 +156,12 @@ test_io(void)
// Fill in the variant // Fill in the variant
single_set_s (x, s); single_set_s (x, s);
f = fopen ("a.dat", "wt"); f = fopen ("a-mvariant.dat", "wt");
if (!f) abort(); if (!f) abort();
single_out_str(f, x); single_out_str(f, x);
fclose (f); fclose (f);
f = fopen ("a.dat", "rt"); f = fopen ("a-mvariant.dat", "rt");
b = single_in_str (y, f); b = single_in_str (y, f);
assert (b == true); assert (b == true);
fclose(f); fclose(f);