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 29850-4a5867bab3) Lines: 2231 2372 94.1 %
Date: 2025-01-04 09:08:27 Functions: 174 178 97.8 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
Decomp 253361
Flx_checkdeflate 1595138
Flx_radical 1595119
FpX_radical 5522
Fp_basis 306712
FqM_to_nfM 10610
FqV_to_nfV 0
FqX_non_root 21
FqX_to_nfX 12669
Fq_to_nf 3239279
QXQV_to_FpM 203
QpXV_denom 506150
QpX_denom 2726906
QpX_remove_denom 1729644
RgV_nffix 49
RgX_nffix 303857
RgX_to_algX 1638
Rg_nffix 906873
ZX_Dedekind 1532663
ZX_rescale_inv 59745
Z_fac 183
Zlx_gcd 245174
Zlx_sylvester_echelon 4657162
ZpM_hnfmodid 451943
ZpX_disc_val 182537
ZpX_gcd 253363
ZpX_monic_factor 490
ZpX_monic_factor_squarefree 1071
ZpX_primedec 0
ZpX_reduced_resultant 986809
ZpX_reduced_resultant_fast 927132
ZpX_resultant_val 3445740
ZpX_resultant_val_i 3489932
ZpX_round4 770
ZpX_sylvester_echelon 72964
_msqr 11557
_sqr 71293
checkmodpr 210
checkprid 17934315
checkprid_i 22903132
compmod 284963
compositum 91
compositum2 2877
compositum_fix 26524
dbasis 618042
diag_denom 98157
diag_denomval 685745
dim1proj 1030725
ei_msqr_mod 347346
errprime 0
expo_is_squarefree 812
fact_from_factors 3619
ffdegree 4109
fill 13368
fix_PE 477
fnz 217132
gc_nf_to_Fq 15206874
gen_if_principal 35
get_LV 214427
get_coprimes 273
get_d 2653
get_g 352801
get_gamma 299744
get_maxord 812502
get_modpr 137746
get_module 63
get_norm 501941
get_nu 635712
get_partial_order_as_pols 506152
get_powers 158921
get_pr 411271
get_prid 939099
getprime 558418
ideal_is1 28355
idealprimedec 1273086
idealprimedec_degrees 371
idealprimedec_galois 6552
idealprimedec_kummer 3800311
idealprimedec_limit_f 2700953
idealprimedec_limit_norm 505217
indexpartial 44114
init_m 4372812
init_norm 214401
is_uniformizer 501932
lift_to_zk 91826
loop 236962
manage_cache 699528
maxord 1532665
maxord_disc 711208
maxord_i 452707
minval 15966
mk_pr 4256639
modpr_TAU 3526349
modpr_genFq 4403
modprinit 1158874
mul_intersect 701052
mycaract 699585
newtoncharpoly 692913
newtonsums 699598
nfM_to_FqM 5809
nfV_to_FqV 167403
nfXQ_mul 62922
nfX_mul 67794
nfX_rem 62922
nfX_sub 4872
nfX_to_FqX 10857
nfX_to_monic 1652
nfXisintegral 7490
nf_pV_to_prV 38562
nf_pV_to_prVV 26572
nf_to_Fq 12634084
nf_to_Fq_i 15207407
nf_to_Fq_init 3513363
nfbasis 938
nfcompositum 13375
nfcompositum_lambda 497
nfdisc 66462
nfdiscfactors 644753
nfidealdet1 63
nfisintegral 34307
nfmaxord 101294
nfmaxord_check_args 812511
nfmodpr 350
nfmodprinit 7
nfmodprinit0 77
nfmodprlift 77
nfpolisintegral 12313
nfpolisintegral_i 12313
nfreducemodpr 210
ok_modpr 4364540
p_is_prime 2198
pol_min 117218
polcompositum0 12835
poldiscfactors 42
poldiscfactors_i 788555
pow_ei_mod_p 737411
pr_anti_uniformizer 967490
pr_factorback 4361
pr_factorback_scal 4361
pradical 214429
primedec_aux 2707867
primedec_end 214426
progress 391846
redelt 48003
redelt_i 63442
rnfallbase 2604
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 746008
set_disc 812496
split_char 475523
sqr_mod 821182
testb2 66718
testc2 48001
to_ff_init 3532108
triv_order 1296
uniformizer 296311
update_den 3527616
update_fact 2148
update_phi 274913
vstar 618864
zk_to_Fq 7126738
zk_to_Fq_init 18739
zkmodprinit 175425
zx_z_div 1527079

Generated by: LCOV version 1.16