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 29466-df46cf9131) Lines: 2213 2338 94.7 %
Date: 2024-07-26 09:04:52 Functions: 168 172 97.7 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
Decomp 252899
Flx_checkdeflate 1592734
Flx_radical 1592722
FpX_radical 5502
Fp_basis 305102
FqM_to_nfM 10358
FqV_to_nfV 0
FqX_non_root 21
FqX_to_nfX 11801
Fq_to_nf 3235492
QXQV_to_FpM 203
QpXV_denom 505227
QpX_denom 2727341
QpX_remove_denom 1731556
RgV_nffix 49
RgX_nffix 279546
RgX_to_algX 1638
Rg_nffix 842631
Rg_to_ff 15174001
ZX_Dedekind 1530170
ZX_rescale_inv 59772
Z_fac 183
Zlx_gcd 244719
Zlx_sylvester_echelon 4650230
ZpM_hnfmodid 452074
ZpX_disc_val 182402
ZpX_gcd 252900
ZpX_monic_factor 490
ZpX_monic_factor_squarefree 1071
ZpX_primedec 0
ZpX_reduced_resultant 987578
ZpX_reduced_resultant_fast 927991
ZpX_resultant_val 3438426
ZpX_resultant_val_i 3482691
ZpX_round4 770
ZpX_sylvester_echelon 72974
_msqr 11473
_sqr 71272
anti_uniformizer 963988
checkmodpr 210
checkprid 17970905
checkprid_i 22853703
compmod 285591
compositum 91
compositum2 2828
compositum_fix 26463
dbasis 617356
diag_denom 97474
diag_denomval 684301
dim1proj 1029573
ei_msqr_mod 343590
errprime 0
expo_is_squarefree 812
fact_from_factors 3584
ffdegree 4109
fill 13116
fix_PE 477
fnz 215794
gen_if_principal 35
get_LV 212379
get_coprimes 273
get_d 2275
get_g 352624
get_gamma 299566
get_maxord 811841
get_modpr 137746
get_module 63
get_norm 498229
get_nu 635874
get_partial_order_as_pols 505227
get_powers 157942
get_pr 408389
get_prid 936572
getprime 559326
ideal_is1 27893
idealprimedec 1267600
idealprimedec_degrees 371
idealprimedec_galois 6552
idealprimedec_kummer 3789476
idealprimedec_limit_f 2691560
idealprimedec_limit_norm 505225
indexpartial 44044
init_m 4366353
init_norm 212356
is_uniformizer 498223
lift_to_zk 91217
loop 237129
manage_cache 700270
maxord 1530171
maxord_disc 711154
maxord_i 452834
minval 15728
mk_pr 4242057
modpr_TAU 3524833
modpr_genFq 4326
modprinit 1157616
mul_intersect 697774
mycaract 700301
newtoncharpoly 693618
newtonsums 700310
nfM_to_FqM 5648
nfV_to_FqV 167403
nfXQ_mul 62376
nfX_mul 66863
nfX_rem 62376
nfX_sub 4487
nfX_to_FqX 10094
nfX_to_monic 1652
nf_pV_to_prV 38528
nf_to_Fq 15173508
nf_to_Fq_init 3511858
nfbasis 938
nfcompositum 13345
nfcompositum_lambda 497
nfdisc 66430
nfdiscfactors 644734
nfidealdet1 63
nfmaxord 100691
nfmaxord_check_args 811849
nfmodpr 329
nfmodprinit 7
nfmodprinit0 70
nfmodprlift 77
nfreducemodpr 210
ok_modpr 4362877
p_is_prime 2055
pol_min 116530
polcompositum0 12806
poldiscfactors 42
poldiscfactors_i 788115
pow_ei_mod_p 732902
pr_factorback 3605
pr_factorback_scal 3605
pradical 212377
primedec_aux 2698462
primedec_end 212378
progress 392515
redelt 48461
redelt_i 63907
rnfallbase 2219
rnfbasis 21
rnfdedekind 91
rnfdedekind_i 4522
rnfdet 14
rnfdisc_factored 854
rnfdiscf 77
rnfeltid_powmod 21902
rnfhnfbasis 7
rnfisfree 7
rnfjoinmodules 2218
rnfjoinmodules_i 6558
rnfmaxord 4438
rnfsimplifybasis 0
rnfsteinitz 28
safe_Z_pvalrem 12285
setPE 745409
set_disc 811792
split_char 475680
sqr_mod 814351
testb2 66800
testc2 48461
to_ff_init 3530577
triv_order 1016
uniformizer 294175
update_den 3526971
update_fact 2077
update_phi 275457
vstar 619785
zk_to_Fq 7113596
zk_to_Fq_init 18711
zkmodprinit 174935
zx_z_div 1524629

Generated by: LCOV version 1.16