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 28676-df828f1c94) Lines: 1643 1794 91.6 %
Date: 2023-08-26 07:54:43 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 602
vecinv 770
vecdiv 903
idealprodval 2764
idealdown 2982
idealfactor_partial 3766
idealispower 3787
idealdivexact 3833
vecsqr 4949
idealdivpowprime 6430
gpidealval 7105
ramified_root 7525
idealsqrtn_int 7532
famat_div_shallow 10164
make_integral 10654
_mul 11244
nf_get_Gtwist1 12660
twistG 12702
idealnorm 13371
idealred_elt 14145
famatV_factorback 15550
idealmulred 16902
pr_inv 17918
idealaddtoone_i 19495
famat_to_nf_moddivisor 19992
ext_inv 20241
famat_inv 20241
famat_sqr 23129
famat_inv_shallow 26750
Q_nffactor 28088
_idealmulred 28146
prV_e_muls 33714
ext_sqr 34077
_idealsqrred 35851
_sqr 35851
idealcoprimefact 37210
idealsqr 38700
idealsqr_aux 38700
pr_inv_p 38943
idealdiv 39767
prV_primes 40298
famat_sub 41322
famat_div 41329
famatV_zv_factorback 46529
idealredmodpower 48439
idealapprfact_i 54708
famat_remove_trivial 55337
factorbackprime 56232
addmul_mat 58527
pr_uniformizer 60022
famat_pow 60711
famat_pow_shallow 67255
idealadd 78103
idealHNF_inv 78154
idealpowred 79446
prV_lcm_capZ 82582
famat_mulpow_shallow 89067
p_makecoprime 89515
ext_mul 91449
RM_round_maxrank 96026
idealredmodpower_i 96863
idealtwoelt 101903
famat_mulpows_shallow 118004
nf_to_Fp_coprime 118779
to_Fp_coprime 120627
famat_pows_shallow 122027
get_random_a 122478
idealred0 137745
nf_get_Gtwist 137751
idealpseudomin 142505
idealinv 148599
famat_add 171270
famatsmall_reduce 173787
append 185580
famat_mul_shallow 204914
idealHNF_inv_Z 219719
idealHNF_factor 223818
idealsqrprime 226763
ok_elt 230242
idealpows 247834
idealfactor 251791
idealfactor_limit 251996
mat_ideal_two_elt 258793
famat_mul 266641
idealHNF_factor_i 269179
idealHNF_Z_factor_i 269181
idealnumden 276230
famat_reduce 296649
idealmulelt 305325
Z_cba 346807
idealHNF_mul 391360
Z_ppio 456329
idealhnf_two 528781
ZM_famat_limit 568328
idealaddtoone_raw 611442
_idealaddtoone 630935
idealpow_aux 670068
idealpow 670070
idealmul 697668
idealmul_aux 697668
idealHNF_norm_pval 719571
idealmulpowprime 733758
idealHNF_val 857562
idealHNF_mul_two 937926
vecmul 960466
idealpowprime 963649
Z_ppo 1040334
idealpseudominvec 1202926
idealpseudored 1281805
idealhnf_principal 1301429
idealhnf_shallow 1576535
lcmuu 1800709
famat_makecoprime 1996203
idealval 2061760
to_famat_shallow 2459874
Z_cba_rec 3090619
pr_hnf 3258025
zk_pvalrem 3865447
nf_remove_denom_p 3962786
Fl_invgen 5768582
idealtyp 8286044
u_ppo 51588396

Generated by: LCOV version 1.14