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 30074-db9b3c0519) Lines: 748 805 92.9 %
Date: 2025-03-13 08:38:27 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 6
cert_out 6
magma_out 12
primo_out 12
ecpp 24
dihedralpol 30
ecppexport 30
ecppisvalid 30
ecppisvalid_i 30
realpart 30
isprimeECPP 36
cert_get_T 42
cert_get_lambda 42
ecpp_flattencert 48
ecpp_step2 48
polmodular_db_init_allinv 48
allh 66
ecpp_disclist_init 66
ecpp_param 66
ecpp_param_set 66
ecpp_primelist_init 66
ecpp_primeord_init 66
ecpp_step1 66
primorial_vec 66
cert_get_J 84
ecpp0 84
cert_get_x 132
cert_get_D 144
cert_get_E 144
j0_find_g 174
cert_get_q 180
allh_r 336
genusfield 354
cert_get_a6 402
Nq_isvalid 432
primecertisvalid_ecpp_worker 438
primo_printval 618
cert_get_m 756
cert_get_s 756
D_polclass 906
Dfac_to_p 906
Dfac_to_roots 906
FpX_classtower_oneroot 906
NDmqg_get_N 906
NDmqg_get_g 906
NDmqg_get_m 906
NDmqg_get_q 906
NDmqg_get_sqrt 906
ecpp_step2_worker 906
find_EP 906
mkNDmqg 906
N_downrun 960
ecpp_param_get_disclist 960
ecpp_param_get_maxpcdg 960
ecpp_param_get_uprimelist 960
tunevec_batchsize 960
cert_get_P 1110
cert_get_a4 1248
cert_get_t 1476
sort_Dmq_by_cnum 1986
NqE_check 2082
cert_get_N 2592
sort_NDmq_by_D 3288
Dmbatch_factor_Dmqvec 3306
Dmqvec_slice 3306
Dmvec_batchfactor 3306
ecpp_param_get_primorial_vec 3306
ecpp_qlo 3306
Dmq_get_h 3972
ecpp_param_get_tune 4266
tunevec 4266
tunevec_tdivbd 4266
FpJ_is_inf 4596
NDmqg_get_D 6576
zv_binsearch0 6612
NDmqg_get_Dinfo 8388
NUV_find_m 9312
gained_bits 10326
lessthan_qlo 11448
ecpp_param_get_primeord 14088
ecpp_parsqrt 14088
ecpp_sqrt_worker 14088
ecpp_param_get_primelist 15096
ecpp_ispsp_worker 17418
D_find_discsqrt 34866
sort_Dmq_by_q 49182
D_collectcards 461172
mkDinfo 1634934
Dinfo_get_bi 19503138
sort_disclist 24704124
Dinfo_get_h 25769430
Dinfo_get_Dfac 27862404
D_get_wD 49418154
Dinfo_get_pd 49542642
Dinfo_get_D 49878714

Generated by: LCOV version 1.16