Mentions légales du service

Skip to content

Improve test.ecm to display what line failure was on

Seth Troisi requested to merge check_test_output into master

This makes is easier to figure out what test broke. Sadly ubuntu's default shell is dash which doesn't support LINENO [1], so you have to run ./test.ecm with bash test.ecm to the new output.

Adding a fake error changing checkcode 14 to 13 on line 807

$ bash ./test.ecm
GMP-ECM 7.0.6-dev [configured with GMP 6.3.0, --enable-asm-redc, --enable-gpu, --enable-assert] [ECM]
Input number is 2050449353925555290706354283 (28 digits)
Using B1=30, B2=30-1000000, polynomial x^1, sigma=0:7
...
Factor found during init of Z4xZ4 (mb)
********** Factor found in step 1: 13
Found prime factor of 2 digits: 13
Prime cofactor 13 has 2 digits

################### ERROR ####################
Expected return code 13 but got 14 on line 807
----------- SOURCE LINE 806 and 807 ----------
# Factor found during init of Z4xZ4 (mb)
echo 169 | $ECM -torsion Z4xZ4 -sigma 8 1e2; checkcode $? 13
##############################################

Merge request reports