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: 1643 1794 91.6 %
Date: 2024-04-24 08:07:32 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
in_ideal 28
trivial_merge 28
ZV_cba_extend 35
idealaddmultoone 35
idealismaximal_int 35
idealtwoelt2 42
idealdiv0 56
idealismaximal 63
idealismaximal_i 63
matreduce 63
hnf_Z_QC 70
idealaddtoone0 70
idealmul0 70
idealtwoelt0 70
hnf_Q_QC 77
hnf_Z_ZC 77
idealcoprime 84
idealpow0 84
isideal 91
idealaddtoone 98
sunits_makecoprime 98
nf_coprime_part 126
gpidealfactor 182
idealhnf0 210
idealhnf 301
idealprodprime 336
idealprod 462
famat_to_Fp_coprime 763
vecinv 770
vecdiv 903
idealprodval 2722
idealdown 2982
idealispower 3667
idealdivexact 4411
gpidealval 7105
ramified_root 7271
idealsqrtn_int 7278
idealdivpowprime 9983
famat_div_shallow 10311
_mul 10698
make_integral 10976
nf_get_Gtwist1 12571
idealred_elt 12584
twistG 12613
famatV_factorback 13556
idealmulred 16717
pr_inv 18259
idealaddtoone_i 19446
famat_to_nf_moddivisor 20069
ext_inv 20440
famat_inv 20440
famat_sqr 21609
idealfactor_partial 25417
Q_nffactor 26853
famat_inv_shallow 27087
_idealmulred 27415
prV_e_muls 27508
ext_sqr 32557
_idealsqrred 34342
_sqr 34342
idealcoprimefact 37204
idealsqr 37226
idealsqr_aux 37226
famat_sub 37996
famat_div 38003
pr_inv_p 38857
idealdiv 39470
famatV_zv_factorback 46529
idealredmodpower 48587
famat_remove_trivial 53372
idealapprfact_i 53884
factorbackprime 57537
pr_uniformizer 58056
prV_primes 60466
famat_pow 60642
famat_pow_shallow 62603
addmul_mat 65691
idealHNF_inv 77627
idealpowred 79455
prV_lcm_capZ 81835
ext_mul 87622
famat_mulpow_shallow 88438
p_makecoprime 91498
RM_round_maxrank 96210
idealredmodpower_i 97159
idealnorm 99801
idealtwoelt 102111
idealadd 106417
famat_mulpows_shallow 117985
nf_to_Fp_coprime 119336
get_random_a 120160
to_Fp_coprime 122514
famat_pows_shallow 123046
idealred0 135820
nf_get_Gtwist 135827
vecsqr 136899
idealpseudomin 138904
idealinv 147137
famat_add 168143
famatsmall_reduce 173587
append 179288
famat_mul_shallow 200011
idealHNF_inv_Z 215663
ok_elt 226669
idealHNF_factor 239038
idealpows 248012
mat_ideal_two_elt 254379
famat_mul 262794
idealfactor 265615
idealfactor_limit 265985
idealHNF_factor_i 284537
idealHNF_Z_factor_i 284540
idealsqrprime 285368
famat_reduce 295005
idealmulelt 301896
idealnumden 377831
Z_cba 394926
idealHNF_mul 395537
Z_ppio 512533
ZM_famat_limit 567880
idealmul 569045
idealmul_aux 569045
idealhnf_two 696519
idealaddtoone_raw 711883
_idealaddtoone 731329
idealHNF_norm_pval 732493
idealmulpowprime 755137
idealHNF_mul_two 832253
idealpow_aux 839299
idealpow 839301
idealHNF_val 868723
Z_ppo 1075243
idealpowprime 1144046
idealpseudominvec 1203773
idealpseudored 1283433
idealhnf_principal 1363160
lcmuu 1523985
idealhnf_shallow 1741091
famat_makecoprime 2000704
idealval 2157293
to_famat_shallow 2461490
pr_hnf 3603754
Z_cba_rec 3608668
zk_pvalrem 3922653
nf_remove_denom_p 4021238
Fl_invgen 5516037
idealtyp 8749559
vecmul 10849204
u_ppo 53871415

Generated by: LCOV version 1.14