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 - base2.c (source / functions) Hit Total Coverage
Test: PARI/GP v2.18.0 lcov report (development 29712-7c8a932571) Lines: 2213 2338 94.7 %
Date: 2024-11-15 09:08:45 Functions: 168 172 97.7 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
Decomp 253222
Flx_checkdeflate 1594858
Flx_radical 1594839
FpX_radical 5528
Fp_basis 306583
FqM_to_nfM 10610
FqV_to_nfV 0
FqX_non_root 21
FqX_to_nfX 12655
Fq_to_nf 3239251
QXQV_to_FpM 203
QpXV_denom 505866
QpX_denom 2727664
QpX_remove_denom 1730944
RgV_nffix 49
RgX_nffix 303538
RgX_to_algX 1638
Rg_nffix 906129
Rg_to_ff 15207360
ZX_Dedekind 1532355
ZX_rescale_inv 59836
Z_fac 183
Zlx_gcd 245038
Zlx_sylvester_echelon 4658202
ZpM_hnfmodid 451970
ZpX_disc_val 182422
ZpX_gcd 253220
ZpX_monic_factor 490
ZpX_monic_factor_squarefree 1071
ZpX_primedec 0
ZpX_reduced_resultant 987334
ZpX_reduced_resultant_fast 927636
ZpX_resultant_val 3446360
ZpX_resultant_val_i 3490547
ZpX_round4 770
ZpX_sylvester_echelon 72948
_msqr 11557
_sqr 71293
checkmodpr 210
checkprid 17934264
checkprid_i 22903983
compmod 285279
compositum 91
compositum2 2877
compositum_fix 26527
dbasis 618076
diag_denom 98070
diag_denomval 685685
dim1proj 1030705
ei_msqr_mod 347324
errprime 0
expo_is_squarefree 812
fact_from_factors 3619
ffdegree 4109
fill 13368
fix_PE 477
fnz 216685
gen_if_principal 35
get_LV 214326
get_coprimes 273
get_d 2646
get_g 353055
get_gamma 299996
get_maxord 812507
get_modpr 137746
get_module 63
get_norm 501691
get_nu 636208
get_partial_order_as_pols 505872
get_powers 158747
get_pr 411136
get_prid 939099
getprime 559026
ideal_is1 28355
idealprimedec 1273309
idealprimedec_degrees 371
idealprimedec_galois 6552
idealprimedec_kummer 3801024
idealprimedec_limit_f 2701217
idealprimedec_limit_norm 505223
indexpartial 44107
init_m 4373932
init_norm 214292
is_uniformizer 501684
lift_to_zk 91671
loop 237150
manage_cache 700240
maxord 1532356
maxord_disc 711220
maxord_i 452734
minval 15966
mk_pr 4257056
modpr_TAU 3526265
modpr_genFq 4403
modprinit 1158868
mul_intersect 700862
mycaract 700305
newtoncharpoly 693542
newtonsums 700317
nfM_to_FqM 5809
nfV_to_FqV 167403
nfXQ_mul 62922
nfX_mul 67787
nfX_rem 62922
nfX_sub 4865
nfX_to_FqX 10850
nfX_to_monic 1652
nf_pV_to_prV 38563
nf_to_Fq 15206856
nf_to_Fq_init 3513341
nfbasis 938
nfcompositum 13376
nfcompositum_lambda 497
nfdisc 66465
nfdiscfactors 644764
nfidealdet1 63
nfmaxord 101288
nfmaxord_check_args 812511
nfmodpr 329
nfmodprinit 7
nfmodprinit0 70
nfmodprlift 77
nfreducemodpr 210
ok_modpr 4364528
p_is_prime 2153
pol_min 117123
polcompositum0 12837
poldiscfactors 42
poldiscfactors_i 788546
pow_ei_mod_p 737258
pr_anti_uniformizer 967455
pr_factorback 4347
pr_factorback_scal 4347
pradical 214325
primedec_aux 2708117
primedec_end 214326
progress 392199
redelt 48135
redelt_i 63663
rnfallbase 2590
rnfbasis 21
rnfdedekind 91
rnfdedekind_i 4900
rnfdet 14
rnfdisc_factored 854
rnfdiscf 77
rnfeltid_powmod 22203
rnfhnfbasis 7
rnfisfree 7
rnfjoinmodules 2316
rnfjoinmodules_i 6684
rnfmaxord 4816
rnfsimplifybasis 0
rnfsteinitz 28
safe_Z_pvalrem 12355
setPE 746017
set_disc 812471
split_char 475920
sqr_mod 821263
testb2 66787
testc2 48135
to_ff_init 3532100
triv_order 1289
uniformizer 296122
update_den 3530125
update_fact 2153
update_phi 275213
vstar 619577
zk_to_Fq 7126673
zk_to_Fq_init 18739
zkmodprinit 175425
zx_z_div 1526769

Generated by: LCOV version 1.16