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 30676-32b8a71ec1) Lines: 580 704 82.4 %
Date: 2026-02-14 09:22:40 Functions: 48 50 96.0 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
_mul 2038627
_powpolmod 43403
_powpolmodsimple 8777
_red 802015
_red_cyclo2n 559505
_red_cyclop 1735914
add 336
aprcl 972
aprcl_step4_worker 13005
aprcl_step6_worker 1180
aut 142001
autvec_AL 21249
autvec_TH 21246
calcglobs 951
check_t 301
compute_e 951
compute_g 13003
compute_t 951
compute_t_small 951
computetabdl 19049
divisorslenstra 63
filltabs 5022
finda 1376
get_jac 20224
get_jac2 6051
is_m1 6257
isprimeAPRCL 972
look_eta 20227
look_eta2 6054
makepoldeg1 1128880
modZ 15363898
powpolmod 26268
red_cyclo2n 559480
red_cyclo2n_ip 560882
red_cyclop 1735861
set_add 385
sqrconst 0
sqrmod 2237596
sqrmod3 660917
sqrmod4 471575
sqrmod5 1222017
sqrmodZ 7120928
step4a 20224
step4b 1021
step4c 5029
step4d 6936
step5 0
step6 951
u_red_cyclo2n_ip 7331
zv_to_ZX 20228

Generated by: LCOV version 1.16