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.16.2 lcov report (development 29115-f22e516b23) Lines: 2213 2337 94.7 %
Date: 2024-04-20 08:07:50 Functions: 168 172 97.7 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
Decomp 253263
Flx_checkdeflate 1593682
Flx_radical 1593665
FpX_radical 5486
Fp_basis 305644
FqM_to_nfM 9924
FqV_to_nfV 0
FqX_non_root 21
FqX_to_nfX 11549
Fq_to_nf 3229347
QXQV_to_FpM 203
QpXV_denom 505948
QpX_denom 2724781
QpX_remove_denom 1728629
RgV_nffix 49
RgX_nffix 279454
RgX_to_algX 1631
Rg_nffix 842257
Rg_to_ff 15137680
ZX_Dedekind 1531271
ZX_rescale_inv 59515
Z_fac 189
Zlx_gcd 245083
Zlx_sylvester_echelon 4650553
ZpM_hnfmodid 451335
ZpX_disc_val 182383
ZpX_gcd 253262
ZpX_monic_factor 490
ZpX_monic_factor_squarefree 1071
ZpX_primedec 0
ZpX_reduced_resultant 985873
ZpX_reduced_resultant_fast 926090
ZpX_resultant_val 3440136
ZpX_resultant_val_i 3484285
ZpX_round4 770
ZpX_sylvester_echelon 72927
_msqr 11347
_sqr 69641
anti_uniformizer 963819
checkmodpr 210
checkprid 10667907
checkprid_i 12232974
compmod 284813
compositum 91
compositum2 2828
compositum_fix 26464
dbasis 617185
diag_denom 97332
diag_denomval 684942
dim1proj 1029274
ei_msqr_mod 344175
errprime 0
expo_is_squarefree 812
fact_from_factors 3584
ffdegree 4109
fill 12584
fix_PE 476
fnz 215949
gen_if_principal 35
get_LV 213362
get_coprimes 266
get_d 2240
get_g 352789
get_gamma 299794
get_maxord 811620
get_modpr 137746
get_module 63
get_norm 501808
get_nu 635492
get_partial_order_as_pols 505951
get_powers 158384
get_pr 409828
get_prid 918232
getprime 558370
ideal_is1 26815
idealprimedec 1269909
idealprimedec_degrees 364
idealprimedec_galois 6545
idealprimedec_kummer 3790483
idealprimedec_limit_f 2692686
idealprimedec_limit_norm 504830
indexpartial 44065
init_m 4366166
init_norm 213335
is_uniformizer 501801
lift_to_zk 91427
loop 236794
manage_cache 699218
maxord 1531271
maxord_disc 711183
maxord_i 452102
minval 15119
mk_pr 4245446
modpr_TAU 3521650
modpr_genFq 4326
modprinit 1157294
mul_intersect 699231
mycaract 699286
newtoncharpoly 692761
newtonsums 699289
nfM_to_FqM 5382
nfV_to_FqV 167403
nfXQ_mul 60745
nfX_mul 65148
nfX_rem 60745
nfX_sub 4403
nfX_to_FqX 9751
nfX_to_monic 1645
nf_pV_to_prV 38528
nf_to_Fq 15137191
nf_to_Fq_init 3508685
nfbasis 938
nfcompositum 13344
nfcompositum_lambda 497
nfdisc 66429
nfdiscfactors 644763
nfidealdet1 63
nfmaxord 100436
nfmaxord_check_args 811615
nfmodpr 329
nfmodprinit 7
nfmodprinit0 70
nfmodprlift 77
nfreducemodpr 210
ok_modpr 4341197
p_is_prime 2226
pol_min 116867
polcompositum0 12805
poldiscfactors 42
poldiscfactors_i 787880
pow_ei_mod_p 735159
pr_factorback 3535
pr_factorback_scal 3535
pradical 213362
primedec_aux 2699578
primedec_end 213362
progress 391515
redelt 48023
redelt_i 63735
rnfallbase 2184
rnfbasis 21
rnfdedekind 91
rnfdedekind_i 4438
rnfdet 14
rnfdisc_factored 854
rnfdiscf 77
rnfeltid_powmod 21090
rnfhnfbasis 7
rnfisfree 7
rnfjoinmodules 2134
rnfjoinmodules_i 6292
rnfmaxord 4354
rnfsimplifybasis 0
rnfsteinitz 28
safe_Z_pvalrem 12285
setPE 745154
set_disc 811593
split_char 475544
sqr_mod 816577
testb2 66543
testc2 48023
to_ff_init 3527240
triv_order 1016
uniformizer 295524
update_den 3530366
update_fact 2090
update_phi 274517
vstar 618630
zk_to_Fq 7098000
zk_to_Fq_init 18536
zkmodprinit 174935
zx_z_div 1525716

Generated by: LCOV version 1.14