Code coverage tests

This page documents the degree to which the PARI/GP source code is tested by our public test suite, distributed with the source distribution in directory src/test/. This is measured by the gcov utility; we then process gcov output using the lcov frond-end.

We test a few variants depending on Configure flags on the pari.math.u-bordeaux.fr machine (x86_64 architecture), and agregate them in the final report:

The target is to exceed 90% coverage for all mathematical modules (given that branches depending on DEBUGLEVEL or DEBUGMEM are not covered). This script is run to produce the results below.

LCOV - code coverage report
Current view: top level - basemath - aprcl.c (source / functions) Hit Total Coverage
Test: PARI/GP v2.18.1 lcov report (development 30592-30cd175d91) Lines: 581 704 82.5 %
Date: 2026-01-03 09:20:22 Functions: 48 50 96.0 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
sqrconst 0
step5 0
divisorslenstra 63
check_t 301
add 336
set_add 385
calcglobs 949
compute_e 949
compute_t 949
compute_t_small 949
step6 949
aprcl 970
isprimeAPRCL 970
step4b 1017
aprcl_step6_worker 1178
finda 1372
filltabs 5010
step4c 5013
get_jac2 6030
look_eta2 6039
is_m1 6245
step4d 6927
u_red_cyclo2n_ip 7309
_powpolmodsimple 8754
aprcl_step4_worker 12974
compute_g 12978
computetabdl 19005
step4a 20196
get_jac 20198
look_eta 20199
zv_to_ZX 20202
autvec_TH 21214
autvec_AL 21219
powpolmod 26225
_powpolmod 43324
aut 141832
sqrmod4 470941
_red_cyclo2n 558792
red_cyclo2n 558793
red_cyclo2n_ip 560163
sqrmod3 661218
_red 800857
makepoldeg1 1129316
sqrmod5 1222227
red_cyclop 1735561
_red_cyclop 1735615
_mul 2037465
sqrmod 2236390
sqrmodZ 7130838
modZ 15396072

Generated by: LCOV version 1.16