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 - base4.c (source / functions) Hit Total Coverage
Test: PARI/GP v2.16.1 lcov report (development 28697-a4113027d0) Lines: 1643 1794 91.6 %
Date: 2023-09-28 07:47:45 Functions: 164 179 91.6 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
Z_dcba_rec 0
Z_ppgle 0
ext_pow 0
famat_Z_gcd 0
famat_idealfactor 0
famat_to_nf 0
idealHNF_Z_factor 0
idealapprfact 0
idealpseudomin_nonscalar 0
nfdivmodpr 0
nfkermodpr 0
nfpowmodpr 0
nfsolvemodpr 0
to_famat 0
vecpow 0
err_divexact 7
hnf_QC_QC 7
idealmin 7
nfmulmodpr 7
ramified_root_simple 7
vec_mulid 7
idealappr 14
idealappr0 14
not_in_ideal 14
chk_vdir 21
hnf_Q_Q 21
idealintersect 21
idealismaximal_mat 21
mat_ideal_two_elt2 21
ZV_cba 28
ZV_cba_extend 28
in_ideal 28
trivial_merge 28
idealaddmultoone 35
idealismaximal_int 35
hnf_Z_QC 42
idealtwoelt2 42
hnf_Q_QC 49
hnf_Z_ZC 49
idealdiv0 56
idealismaximal 63
idealismaximal_i 63
matreduce 63
idealaddtoone0 70
idealmul0 70
idealtwoelt0 70
idealcoprime 84
idealpow0 84
isideal 91
idealaddtoone 98
sunits_makecoprime 98
gpidealfactor 182
idealhnf0 182
nf_coprime_part 196
idealhnf 273
idealprodprime 342
idealprod 427
famat_to_Fp_coprime 616
vecinv 770
vecdiv 903
idealprodval 2778
idealdown 2982
idealispower 3654
idealdivexact 3717
idealfactor_partial 3766
vecsqr 4949
idealdivpowprime 6430
gpidealval 7105
ramified_root 7259
idealsqrtn_int 7266
famat_div_shallow 10206
make_integral 10654
_mul 11088
idealred_elt 12015
nf_get_Gtwist1 12476
twistG 12518
idealnorm 13139
famatV_factorback 15483
idealmulred 16807
pr_inv 18101
idealaddtoone_i 19593
famat_to_nf_moddivisor 19992
ext_inv 20355
famat_inv 20355
famat_sqr 22651
famat_inv_shallow 26778
_idealmulred 27895
Q_nffactor 27927
ext_sqr 33599
prV_e_muls 33655
_idealsqrred 35384
_sqr 35384
idealcoprimefact 37212
famat_sub 38179
famat_div 38186
idealsqr 38233
idealsqr_aux 38233
pr_inv_p 38933
idealdiv 39595
prV_primes 40299
famatV_zv_factorback 46529
idealredmodpower 48440
idealapprfact_i 54787
famat_remove_trivial 55270
factorbackprime 56247
pr_uniformizer 59772
addmul_mat 60312
famat_pow 60655
famat_pow_shallow 64131
idealadd 77829
idealHNF_inv 78176
idealpowred 79437
prV_lcm_capZ 82661
famat_mulpow_shallow 88794
ext_mul 89108
p_makecoprime 92059
RM_round_maxrank 95845
idealredmodpower_i 96866
idealtwoelt 101974
famat_mulpows_shallow 118004
nf_to_Fp_coprime 119126
get_random_a 120949
to_Fp_coprime 121541
famat_pows_shallow 122390
idealred0 137157
nf_get_Gtwist 137164
idealpseudomin 139716
idealinv 148610
famat_add 169123
famatsmall_reduce 173807
append 180684
famat_mul_shallow 201719
idealHNF_inv_Z 217012
idealHNF_factor 223781
idealsqrprime 228020
ok_elt 228784
idealpows 247715
idealfactor 251602
idealfactor_limit 251785
mat_ideal_two_elt 258353
famat_mul 264246
idealHNF_factor_i 269235
idealHNF_Z_factor_i 269237
idealnumden 276063
famat_reduce 296582
idealmulelt 305396
Z_cba 346807
idealHNF_mul 388384
Z_ppio 456329
idealhnf_two 520270
ZM_famat_limit 568310
idealmul 578409
idealmul_aux 578409
idealaddtoone_raw 611403
_idealaddtoone 630999
idealpow 661451
idealpow_aux 661451
idealHNF_norm_pval 722959
idealmulpowprime 737981
idealHNF_mul_two 820493
idealHNF_val 861298
idealpowprime 959553
vecmul 960671
Z_ppo 1026324
idealpseudominvec 1202616
idealpseudored 1281493
idealhnf_principal 1301037
lcmuu 1514411
idealhnf_shallow 1576299
famat_makecoprime 1996255
idealval 2063678
to_famat_shallow 2459613
Z_cba_rec 3090619
pr_hnf 3182181
zk_pvalrem 3812834
nf_remove_denom_p 3911843
Fl_invgen 5313180
idealtyp 8039008
u_ppo 51227413

Generated by: LCOV version 1.14