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

Generated by: LCOV version 1.16