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 30582-6e9af8ee1d) Lines: 748 805 92.9 %
Date: 2025-12-20 09:23:49 Functions: 95 98 96.9 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
Dmq_get_D 0
time_record 0
timer_record 0
cert_get_qlast 7
cert_out 7
dihedralpol 7
realpart 7
magma_out 14
primo_out 14
ecpp 28
ecppexport 35
ecppisvalid 35
ecppisvalid_i 35
isprimeECPP 42
cert_get_T 56
cert_get_lambda 56
ecpp_flattencert 56
ecpp_step2 56
polmodular_db_init_allinv 56
allh 77
ecpp_disclist_init 77
ecpp_param 77
ecpp_param_set 77
ecpp_primelist_init 77
ecpp_primeord_init 77
ecpp_step1 77
primorial_vec 77
ecpp0 98
cert_get_J 112
cert_get_x 140
cert_get_D 154
cert_get_E 154
j0_find_g 189
cert_get_q 196
genusfield 371
allh_r 392
cert_get_a6 462
Nq_isvalid 496
primecertisvalid_ecpp_worker 503
primo_printval 644
cert_get_m 847
cert_get_s 847
Dfac_to_p 1133
FpX_classtower_oneroot 1133
NDmqg_get_N 1133
NDmqg_get_g 1133
NDmqg_get_m 1133
NDmqg_get_q 1133
NDmqg_get_sqrt 1133
ecpp_step2_worker 1133
find_EP 1133
D_polclass 1134
Dfac_to_roots 1134
mkNDmqg 1134
N_downrun 1197
ecpp_param_get_disclist 1197
ecpp_param_get_maxpcdg 1197
ecpp_param_get_uprimelist 1197
tunevec_batchsize 1197
cert_get_P 1253
cert_get_a4 1435
cert_get_t 1652
sort_Dmq_by_cnum 2233
NqE_check 2407
cert_get_N 2953
Dmbatch_factor_Dmqvec 4368
Dmqvec_slice 4368
Dmvec_batchfactor 4368
ecpp_param_get_primorial_vec 4368
ecpp_qlo 4368
sort_NDmq_by_D 4396
Dmq_get_h 4466
FpJ_is_inf 5313
ecpp_param_get_tune 5565
tunevec 5565
tunevec_tdivbd 5565
zv_binsearch0 8736
NDmqg_get_D 8792
NDmqg_get_Dinfo 11059
NUV_find_m 12376
gained_bits 13755
lessthan_qlo 15092
ecpp_param_get_primeord 16503
ecpp_parsqrt 16503
ecpp_param_get_primelist 17756
ecpp_sqrt_worker 20558
ecpp_ispsp_worker 23936
D_find_discsqrt 43029
sort_Dmq_by_q 62279
D_collectcards 535381
mkDinfo 1907423
Dinfo_get_bi 22911160
sort_disclist 28821345
Dinfo_get_h 30050887
Dinfo_get_Dfac 32490282
D_get_wD 57655759
Dinfo_get_pd 57797348
Dinfo_get_D 58190263

Generated by: LCOV version 1.16