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 29821-ad8e616c7c) Lines: 2231 2372 94.1 %
Date: 2024-12-28 09:09:04 Functions: 174 178 97.8 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
Decomp 253359
Flx_checkdeflate 1595147
Flx_radical 1595106
FpX_radical 5522
Fp_basis 306725
FqM_to_nfM 10610
FqV_to_nfV 0
FqX_non_root 21
FqX_to_nfX 12669
Fq_to_nf 3239280
QXQV_to_FpM 203
QpXV_denom 506142
QpX_denom 2726930
QpX_remove_denom 1729670
RgV_nffix 49
RgX_nffix 303858
RgX_to_algX 1638
Rg_nffix 906879
ZX_Dedekind 1532662
ZX_rescale_inv 59752
Z_fac 183
Zlx_gcd 245169
Zlx_sylvester_echelon 4657236
ZpM_hnfmodid 451936
ZpX_disc_val 182534
ZpX_gcd 253360
ZpX_monic_factor 490
ZpX_monic_factor_squarefree 1071
ZpX_primedec 0
ZpX_reduced_resultant 986791
ZpX_reduced_resultant_fast 927116
ZpX_resultant_val 3445815
ZpX_resultant_val_i 3489946
ZpX_round4 770
ZpX_sylvester_echelon 72964
_msqr 11557
_sqr 71293
checkmodpr 210
checkprid 17934421
checkprid_i 22903143
compmod 284975
compositum 91
compositum2 2877
compositum_fix 26519
dbasis 618041
diag_denom 98155
diag_denomval 685749
dim1proj 1030706
ei_msqr_mod 347346
errprime 0
expo_is_squarefree 812
fact_from_factors 3619
ffdegree 4109
fill 13368
fix_PE 477
fnz 217152
gc_nf_to_Fq 15206878
gen_if_principal 35
get_LV 214436
get_coprimes 273
get_d 2653
get_g 352806
get_gamma 299745
get_maxord 812522
get_modpr 137746
get_module 63
get_norm 501967
get_nu 635713
get_partial_order_as_pols 506151
get_powers 158925
get_pr 411285
get_prid 939099
getprime 558438
ideal_is1 28355
idealprimedec 1273052
idealprimedec_degrees 371
idealprimedec_galois 6552
idealprimedec_kummer 3800323
idealprimedec_limit_f 2700933
idealprimedec_limit_norm 505223
indexpartial 44115
init_m 4372866
init_norm 214401
is_uniformizer 501960
lift_to_zk 91827
loop 236972
manage_cache 699545
maxord 1532663
maxord_disc 711223
maxord_i 452713
minval 15966
mk_pr 4256625
modpr_TAU 3526292
modpr_genFq 4403
modprinit 1158881
mul_intersect 701087
mycaract 699601
newtoncharpoly 692934
newtonsums 699612
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 38563
nf_pV_to_prVV 26572
nf_to_Fq 12634107
nf_to_Fq_i 15207388
nf_to_Fq_init 3513383
nfbasis 938
nfcompositum 13371
nfcompositum_lambda 497
nfdisc 66461
nfdiscfactors 644772
nfidealdet1 63
nfisintegral 34307
nfmaxord 101297
nfmaxord_check_args 812522
nfmodpr 350
nfmodprinit 7
nfmodprinit0 77
nfmodprlift 77
nfpolisintegral 12313
nfpolisintegral_i 12313
nfreducemodpr 210
ok_modpr 4364566
p_is_prime 2199
pol_min 117226
polcompositum0 12832
poldiscfactors 42
poldiscfactors_i 788570
pow_ei_mod_p 737415
pr_anti_uniformizer 967482
pr_factorback 4361
pr_factorback_scal 4361
pradical 214429
primedec_aux 2707824
primedec_end 214436
progress 391854
redelt 48007
redelt_i 63448
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 745997
set_disc 812468
split_char 475528
sqr_mod 821190
testb2 66718
testc2 48008
to_ff_init 3532132
triv_order 1296
uniformizer 296323
update_den 3527618
update_fact 2149
update_phi 274917
vstar 618906
zk_to_Fq 7126731
zk_to_Fq_init 18739
zkmodprinit 175425
zx_z_div 1527085

Generated by: LCOV version 1.16