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 29465-f396510193) Lines: 2213 2338 94.7 %
Date: 2024-07-25 09:03:53 Functions: 168 172 97.7 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
Decomp 252902
Flx_checkdeflate 1592740
Flx_radical 1592722
FpX_radical 5502
Fp_basis 305107
FqM_to_nfM 10358
FqV_to_nfV 0
FqX_non_root 21
FqX_to_nfX 11801
Fq_to_nf 3235491
QXQV_to_FpM 203
QpXV_denom 505231
QpX_denom 2727426
QpX_remove_denom 1731558
RgV_nffix 49
RgX_nffix 279546
RgX_to_algX 1638
Rg_nffix 842630
Rg_to_ff 15174083
ZX_Dedekind 1530158
ZX_rescale_inv 59760
Z_fac 183
Zlx_gcd 244726
Zlx_sylvester_echelon 4650251
ZpM_hnfmodid 452079
ZpX_disc_val 182405
ZpX_gcd 252905
ZpX_monic_factor 490
ZpX_monic_factor_squarefree 1071
ZpX_primedec 0
ZpX_reduced_resultant 987586
ZpX_reduced_resultant_fast 928022
ZpX_resultant_val 3438443
ZpX_resultant_val_i 3482698
ZpX_round4 770
ZpX_sylvester_echelon 72974
_msqr 11473
_sqr 71272
anti_uniformizer 963964
checkmodpr 210
checkprid 17971137
checkprid_i 22854004
compmod 285588
compositum 91
compositum2 2828
compositum_fix 26463
dbasis 617351
diag_denom 97473
diag_denomval 684305
dim1proj 1029575
ei_msqr_mod 343591
errprime 0
expo_is_squarefree 812
fact_from_factors 3584
ffdegree 4109
fill 13116
fix_PE 477
fnz 215797
gen_if_principal 35
get_LV 212379
get_coprimes 273
get_d 2275
get_g 352617
get_gamma 299561
get_maxord 811880
get_modpr 137746
get_module 63
get_norm 498255
get_nu 635878
get_partial_order_as_pols 505231
get_powers 157944
get_pr 408396
get_prid 936572
getprime 559335
ideal_is1 27893
idealprimedec 1267575
idealprimedec_degrees 371
idealprimedec_galois 6552
idealprimedec_kummer 3789432
idealprimedec_limit_f 2691554
idealprimedec_limit_norm 505220
indexpartial 44041
init_m 4366415
init_norm 212345
is_uniformizer 498252
lift_to_zk 91217
loop 237133
manage_cache 700262
maxord 1530159
maxord_disc 711188
maxord_i 452840
minval 15728
mk_pr 4242047
modpr_TAU 3524840
modpr_genFq 4326
modprinit 1157624
mul_intersect 697785
mycaract 700299
newtoncharpoly 693628
newtonsums 700300
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 15173573
nf_to_Fq_init 3511879
nfbasis 938
nfcompositum 13346
nfcompositum_lambda 497
nfdisc 66427
nfdiscfactors 644769
nfidealdet1 63
nfmaxord 100692
nfmaxord_check_args 811880
nfmodpr 329
nfmodprinit 7
nfmodprinit0 70
nfmodprlift 77
nfreducemodpr 210
ok_modpr 4362914
p_is_prime 2055
pol_min 116532
polcompositum0 12807
poldiscfactors 42
poldiscfactors_i 788107
pow_ei_mod_p 732918
pr_factorback 3605
pr_factorback_scal 3605
pradical 212381
primedec_aux 2698460
primedec_end 212379
progress 392526
redelt 48459
redelt_i 63902
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 745406
set_disc 811861
split_char 475680
sqr_mod 814364
testb2 66802
testc2 48459
to_ff_init 3530618
triv_order 1016
uniformizer 294180
update_den 3526912
update_fact 2078
update_phi 275460
vstar 619780
zk_to_Fq 7113640
zk_to_Fq_init 18711
zkmodprinit 174935
zx_z_div 1524642

Generated by: LCOV version 1.16