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.2 lcov report (development 29115-f22e516b23) Lines: 1644 1794 91.6 %
Date: 2024-04-16 08:06:29 Functions: 164 179 91.6 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
Fl_invgen 5514763
Q_nffactor 26834
RM_round_maxrank 96209
ZM_famat_limit 567880
ZV_cba 28
ZV_cba_extend 35
Z_cba 394926
Z_cba_rec 3608668
Z_dcba_rec 0
Z_ppgle 0
Z_ppio 512533
Z_ppo 1075234
_idealaddtoone 731317
_idealmulred 27415
_idealsqrred 34342
_mul 10698
_sqr 34342
addmul_mat 65539
append 179288
chk_vdir 21
err_divexact 7
ext_inv 20440
ext_mul 87622
ext_pow 0
ext_sqr 32557
factorbackprime 57538
famatV_factorback 13556
famatV_zv_factorback 46529
famat_Z_gcd 0
famat_add 168143
famat_div 38003
famat_div_shallow 10311
famat_idealfactor 0
famat_inv 20440
famat_inv_shallow 27087
famat_makecoprime 2000714
famat_mul 262791
famat_mul_shallow 200016
famat_mulpow_shallow 88438
famat_mulpows_shallow 117984
famat_pow 60642
famat_pow_shallow 62603
famat_pows_shallow 123046
famat_reduce 295005
famat_remove_trivial 53369
famat_sqr 21609
famat_sub 37996
famat_to_Fp_coprime 763
famat_to_nf 0
famat_to_nf_moddivisor 20069
famatsmall_reduce 173585
get_random_a 120159
gpidealfactor 182
gpidealval 7105
hnf_QC_QC 7
hnf_Q_Q 21
hnf_Q_QC 77
hnf_Z_QC 70
hnf_Z_ZC 77
idealHNF_Z_factor 0
idealHNF_Z_factor_i 284538
idealHNF_factor 239036
idealHNF_factor_i 284539
idealHNF_inv 77627
idealHNF_inv_Z 215656
idealHNF_mul 395420
idealHNF_mul_two 831730
idealHNF_norm_pval 732442
idealHNF_val 868649
idealadd 106417
idealaddmultoone 35
idealaddtoone 98
idealaddtoone0 70
idealaddtoone_i 19446
idealaddtoone_raw 711870
idealappr 14
idealappr0 14
idealapprfact 0
idealapprfact_i 53884
idealcoprime 84
idealcoprimefact 37204
idealdiv 39470
idealdiv0 56
idealdivexact 4411
idealdivpowprime 9983
idealdown 2982
idealfactor 265586
idealfactor_limit 265962
idealfactor_partial 25417
idealhnf 301
idealhnf0 210
idealhnf_principal 1363151
idealhnf_shallow 1741076
idealhnf_two 696399
idealintersect 21
idealinv 147136
idealismaximal 63
idealismaximal_i 63
idealismaximal_int 35
idealismaximal_mat 21
idealispower 3667
idealmin 7
idealmul 569038
idealmul0 70
idealmul_aux 569038
idealmulelt 301895
idealmulpowprime 754689
idealmulred 16717
idealnorm 99801
idealnumden 377815
idealpow 839173
idealpow0 84
idealpow_aux 839172
idealpowprime 1143465
idealpowred 79454
idealpows 248010
idealprod 462
idealprodprime 336
idealprodval 2722
idealpseudomin 138904
idealpseudomin_nonscalar 0
idealpseudominvec 1203774
idealpseudored 1283458
idealred0 135820
idealred_elt 12584
idealredmodpower 48585
idealredmodpower_i 97160
idealsqr 37226
idealsqr_aux 37226
idealsqrprime 285311
idealsqrtn_int 7278
idealtwoelt 102109
idealtwoelt0 70
idealtwoelt2 42
idealtyp 8749367
idealval 2157289
in_ideal 28
isideal 91
lcmuu 1522815
make_integral 10976
mat_ideal_two_elt 254376
mat_ideal_two_elt2 21
matreduce 63
nf_coprime_part 126
nf_get_Gtwist 135827
nf_get_Gtwist1 12571
nf_remove_denom_p 4021211
nf_to_Fp_coprime 119336
nfdivmodpr 0
nfkermodpr 0
nfmulmodpr 7
nfpowmodpr 0
nfsolvemodpr 0
not_in_ideal 14
ok_elt 226604
p_makecoprime 91498
prV_e_muls 27460
prV_lcm_capZ 81835
prV_primes 60465
pr_hnf 3603698
pr_inv 18258
pr_inv_p 38856
pr_uniformizer 58056
ramified_root 7271
ramified_root_simple 7
sunits_makecoprime 98
to_Fp_coprime 122514
to_famat 0
to_famat_shallow 2461491
trivial_merge 28
twistG 12613
u_ppo 53870443
vec_mulid 7
vecdiv 903
vecinv 770
vecmul 10860536
vecpow 0
vecsqr 136899
zk_pvalrem 3922616

Generated by: LCOV version 1.14