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 - ecpp.c (source / functions) Hit Total Coverage
Test: PARI/GP v2.18.1 lcov report (development 30702-bddb8d6928) Lines: 731 805 90.8 %
Date: 2026-02-23 02:23:56 Functions: 93 98 94.9 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
D_collectcards 419874
D_find_discsqrt 30414
D_get_wD 49417158
D_polclass 894
Dfac_to_p 894
Dfac_to_roots 894
Dinfo_get_D 49837428
Dinfo_get_Dfac 27824346
Dinfo_get_bi 19623402
Dinfo_get_h 25772478
Dinfo_get_pd 49500600
Dmbatch_factor_Dmqvec 3000
Dmq_get_D 0
Dmq_get_h 3768
Dmqvec_slice 3000
Dmvec_batchfactor 3000
FpJ_is_inf 4476
FpX_classtower_oneroot 894
NDmqg_get_D 6552
NDmqg_get_Dinfo 8340
NDmqg_get_N 894
NDmqg_get_g 894
NDmqg_get_m 894
NDmqg_get_q 894
NDmqg_get_sqrt 894
NUV_find_m 8286
N_downrun 942
NqE_check 2022
Nq_isvalid 432
allh 66
allh_r 336
cert_get_D 144
cert_get_E 144
cert_get_J 84
cert_get_N 2592
cert_get_P 1110
cert_get_T 42
cert_get_a4 1248
cert_get_a6 402
cert_get_lambda 42
cert_get_m 756
cert_get_q 180
cert_get_qlast 6
cert_get_s 756
cert_get_t 1476
cert_get_x 132
cert_out 6
dihedralpol 0
ecpp 24
ecpp0 84
ecpp_disclist_init 66
ecpp_flattencert 48
ecpp_ispsp_worker 15474
ecpp_param 66
ecpp_param_get_disclist 942
ecpp_param_get_maxpcdg 942
ecpp_param_get_primelist 13086
ecpp_param_get_primeord 12096
ecpp_param_get_primorial_vec 3000
ecpp_param_get_tune 3942
ecpp_param_get_uprimelist 942
ecpp_param_set 66
ecpp_parsqrt 12096
ecpp_primelist_init 66
ecpp_primeord_init 66
ecpp_qlo 3000
ecpp_sqrt_worker 12096
ecpp_step1 66
ecpp_step2 48
ecpp_step2_worker 894
ecppexport 30
ecppisvalid 30
ecppisvalid_i 30
find_EP 894
gained_bits 9462
genusfield 234
isprimeECPP 36
j0_find_g 198
lessthan_qlo 10464
magma_out 12
mkDinfo 1634934
mkNDmqg 894
polmodular_db_init_allinv 48
primecertisvalid_ecpp_worker 438
primo_out 12
primo_printval 618
primorial_vec 66
realpart 0
sort_Dmq_by_cnum 1884
sort_Dmq_by_q 43848
sort_NDmq_by_D 3276
sort_disclist 24704160
time_record 0
timer_record 0
tunevec 3942
tunevec_batchsize 942
tunevec_tdivbd 3942
zv_binsearch0 6000

Generated by: LCOV version 1.16