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 30347-cb65b7994e) Lines: 751 805 93.3 %
Date: 2025-06-27 09:22:08 Functions: 95 98 96.9 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
D_collectcards 539903
D_find_discsqrt 42714
D_get_wD 57655710
D_polclass 1162
Dfac_to_p 1162
Dfac_to_roots 1162
Dinfo_get_D 58195375
Dinfo_get_Dfac 32450943
Dinfo_get_bi 22911847
Dinfo_get_h 30007054
Dinfo_get_pd 57800792
Dmbatch_factor_Dmqvec 4305
Dmq_get_D 0
Dmq_get_h 4522
Dmqvec_slice 4305
Dmvec_batchfactor 4305
FpJ_is_inf 5495
FpX_classtower_oneroot 1162
NDmqg_get_D 9240
NDmqg_get_Dinfo 11564
NDmqg_get_N 1162
NDmqg_get_g 1162
NDmqg_get_m 1162
NDmqg_get_q 1162
NDmqg_get_sqrt 1162
NUV_find_m 12278
N_downrun 1225
NqE_check 2492
Nq_isvalid 510
allh 77
allh_r 392
cert_get_D 168
cert_get_E 168
cert_get_J 98
cert_get_N 3043
cert_get_P 1302
cert_get_T 49
cert_get_a4 1463
cert_get_a6 469
cert_get_lambda 49
cert_get_m 889
cert_get_q 210
cert_get_qlast 7
cert_get_s 889
cert_get_t 1734
cert_get_x 154
cert_out 7
dihedralpol 14
ecpp 28
ecpp0 98
ecpp_disclist_init 77
ecpp_flattencert 56
ecpp_ispsp_worker 23762
ecpp_param 77
ecpp_param_get_disclist 1225
ecpp_param_get_maxpcdg 1225
ecpp_param_get_primelist 17729
ecpp_param_get_primeord 16448
ecpp_param_get_primorial_vec 4305
ecpp_param_get_tune 5530
ecpp_param_get_uprimelist 1225
ecpp_param_set 77
ecpp_parsqrt 16448
ecpp_primelist_init 77
ecpp_primeord_init 77
ecpp_qlo 4305
ecpp_sqrt_worker 20520
ecpp_step1 77
ecpp_step2 56
ecpp_step2_worker 1162
ecppexport 35
ecppisvalid 35
ecppisvalid_i 35
find_EP 1162
gained_bits 13671
genusfield 357
isprimeECPP 42
j0_find_g 203
lessthan_qlo 15064
magma_out 14
mkDinfo 1907423
mkNDmqg 1162
polmodular_db_init_allinv 56
primecertisvalid_ecpp_worker 516
primo_out 14
primo_printval 721
primorial_vec 77
realpart 14
sort_Dmq_by_cnum 2261
sort_Dmq_by_q 62629
sort_NDmq_by_D 4620
sort_disclist 28821373
time_record 0
timer_record 0
tunevec 5530
tunevec_batchsize 1225
tunevec_tdivbd 5530
zv_binsearch0 8610

Generated by: LCOV version 1.16