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
Fl_invgen 5768582
Q_nffactor 28088
RM_round_maxrank 96026
ZM_famat_limit 568328
ZV_cba 28
ZV_cba_extend 28
Z_cba 346807
Z_cba_rec 3090619
Z_dcba_rec 0
Z_ppgle 0
Z_ppio 456329
Z_ppo 1040334
_idealaddtoone 630935
_idealmulred 28146
_idealsqrred 35851
_mul 11244
_sqr 35851
addmul_mat 58527
append 185580
chk_vdir 21
err_divexact 7
ext_inv 20241
ext_mul 91449
ext_pow 0
ext_sqr 34077
factorbackprime 56232
famatV_factorback 15550
famatV_zv_factorback 46529
famat_Z_gcd 0
famat_add 171270
famat_div 41329
famat_div_shallow 10164
famat_idealfactor 0
famat_inv 20241
famat_inv_shallow 26750
famat_makecoprime 1996203
famat_mul 266641
famat_mul_shallow 204914
famat_mulpow_shallow 89067
famat_mulpows_shallow 118004
famat_pow 60711
famat_pow_shallow 67255
famat_pows_shallow 122027
famat_reduce 296649
famat_remove_trivial 55337
famat_sqr 23129
famat_sub 41322
famat_to_Fp_coprime 602
famat_to_nf 0
famat_to_nf_moddivisor 19992
famatsmall_reduce 173787
get_random_a 122478
gpidealfactor 182
gpidealval 7105
hnf_QC_QC 7
hnf_Q_Q 21
hnf_Q_QC 49
hnf_Z_QC 42
hnf_Z_ZC 49
idealHNF_Z_factor 0
idealHNF_Z_factor_i 269181
idealHNF_factor 223818
idealHNF_factor_i 269179
idealHNF_inv 78154
idealHNF_inv_Z 219719
idealHNF_mul 391360
idealHNF_mul_two 937926
idealHNF_norm_pval 719571
idealHNF_val 857562
idealadd 78103
idealaddmultoone 35
idealaddtoone 98
idealaddtoone0 70
idealaddtoone_i 19495
idealaddtoone_raw 611442
idealappr 14
idealappr0 14
idealapprfact 0
idealapprfact_i 54708
idealcoprime 84
idealcoprimefact 37210
idealdiv 39767
idealdiv0 56
idealdivexact 3833
idealdivpowprime 6430
idealdown 2982
idealfactor 251791
idealfactor_limit 251996
idealfactor_partial 3766
idealhnf 273
idealhnf0 182
idealhnf_principal 1301429
idealhnf_shallow 1576535
idealhnf_two 528781
idealintersect 21
idealinv 148599
idealismaximal 63
idealismaximal_i 63
idealismaximal_int 35
idealismaximal_mat 21
idealispower 3787
idealmin 7
idealmul 697668
idealmul0 70
idealmul_aux 697668
idealmulelt 305325
idealmulpowprime 733758
idealmulred 16902
idealnorm 13371
idealnumden 276230
idealpow 670070
idealpow0 84
idealpow_aux 670068
idealpowprime 963649
idealpowred 79446
idealpows 247834
idealprod 427
idealprodprime 342
idealprodval 2764
idealpseudomin 142505
idealpseudomin_nonscalar 0
idealpseudominvec 1202926
idealpseudored 1281805
idealred0 137745
idealred_elt 14145
idealredmodpower 48439
idealredmodpower_i 96863
idealsqr 38700
idealsqr_aux 38700
idealsqrprime 226763
idealsqrtn_int 7532
idealtwoelt 101903
idealtwoelt0 70
idealtwoelt2 42
idealtyp 8286044
idealval 2061760
in_ideal 28
isideal 91
lcmuu 1800709
make_integral 10654
mat_ideal_two_elt 258793
mat_ideal_two_elt2 21
matreduce 63
nf_coprime_part 196
nf_get_Gtwist 137751
nf_get_Gtwist1 12660
nf_remove_denom_p 3962786
nf_to_Fp_coprime 118779
nfdivmodpr 0
nfkermodpr 0
nfmulmodpr 7
nfpowmodpr 0
nfsolvemodpr 0
not_in_ideal 14
ok_elt 230242
p_makecoprime 89515
prV_e_muls 33714
prV_lcm_capZ 82582
prV_primes 40298
pr_hnf 3258025
pr_inv 17918
pr_inv_p 38943
pr_uniformizer 60022
ramified_root 7525
ramified_root_simple 7
sunits_makecoprime 98
to_Fp_coprime 120627
to_famat 0
to_famat_shallow 2459874
trivial_merge 28
twistG 12702
u_ppo 51588396
vec_mulid 7
vecdiv 903
vecinv 770
vecmul 960466
vecpow 0
vecsqr 4949
zk_pvalrem 3865447

Generated by: LCOV version 1.14