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 29841-6055bbdca6) Lines: 2231 2372 94.1 %
Date: 2025-01-02 09:12:31 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 2148
p_is_prime 2198
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 12835
fill 13368
nfcompositum 13373
minval 15966
zk_to_Fq_init 18739
rnfeltid_powmod 22203
compositum_fix 26521
nf_pV_to_prVV 26572
ideal_is1 28355
nfisintegral 34307
nf_pV_to_prV 38563
indexpartial 44114
redelt 48007
testc2 48007
ZX_rescale_inv 59750
nfXQ_mul 62922
nfX_rem 62922
redelt_i 63450
nfdisc 66462
testb2 66719
nfX_mul 67794
_sqr 71293
ZpX_sylvester_echelon 72964
lift_to_zk 91827
diag_denom 98146
nfmaxord 101298
pol_min 117219
get_modpr 137746
get_powers 158922
nfV_to_FqV 167403
zkmodprinit 175425
ZpX_disc_val 182534
init_norm 214393
primedec_end 214424
get_LV 214425
pradical 214427
fnz 217071
loop 236969
Zlx_gcd 245174
Decomp 253355
ZpX_gcd 253362
update_phi 274913
compmod 284975
uniformizer 296310
get_gamma 299759
RgX_nffix 303858
Fp_basis 306718
ei_msqr_mod 347356
get_g 352818
progress 391857
get_pr 411270
ZpM_hnfmodid 451935
maxord_i 452708
split_char 475568
is_uniformizer 501954
get_norm 501961
idealprimedec_limit_norm 505225
get_partial_order_as_pols 506149
QpXV_denom 506155
getprime 558467
dbasis 618020
vstar 618921
get_nu 635754
nfdiscfactors 644778
diag_denomval 685740
newtoncharpoly 692956
manage_cache 699597
mycaract 699641
newtonsums 699647
mul_intersect 701068
maxord_disc 711231
pow_ei_mod_p 737411
setPE 746017
poldiscfactors_i 788571
set_disc 812507
get_maxord 812528
nfmaxord_check_args 812531
sqr_mod 821192
Rg_nffix 906877
ZpX_reduced_resultant_fast 927127
get_prid 939099
pr_anti_uniformizer 967472
ZpX_reduced_resultant 986805
dim1proj 1030706
modprinit 1158891
idealprimedec 1273040
zx_z_div 1527099
ZX_Dedekind 1532649
maxord 1532650
Flx_radical 1595124
Flx_checkdeflate 1595149
QpX_remove_denom 1729742
idealprimedec_limit_f 2700916
primedec_aux 2707827
QpX_denom 2727026
Fq_to_nf 3239278
ZpX_resultant_val 3445806
ZpX_resultant_val_i 3489977
nf_to_Fq_init 3513365
modpr_TAU 3526340
update_den 3527828
to_ff_init 3532125
idealprimedec_kummer 3800254
mk_pr 4256558
ok_modpr 4364561
init_m 4372878
Zlx_sylvester_echelon 4657217
zk_to_Fq 7126730
nf_to_Fq 12634099
gc_nf_to_Fq 15206872
nf_to_Fq_i 15207395
checkprid 17934092
checkprid_i 22902880

Generated by: LCOV version 1.16