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 29419-8afb0ed749) Lines: 1685 1837 91.7 %
Date: 2024-07-02 09:03:41 Functions: 170 185 91.9 %
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
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
matreduce 63
hnf_Z_QC 70
idealaddtoone0 70
idealismaximal 70
idealismaximal_i 70
idealmul0 70
idealtwoelt0 70
hnf_Q_QC 77
hnf_Z_ZC 77
idealcoprime 84
idealpow0 84
nfV_eltembed 84
nfV_idealhnf 84
nfweilheight 84
nfweilheight_i 84
isideal 91
vec_mulid 91
idealaddtoone 98
sunits_makecoprime 98
nf_coprime_part 126
gpidealfactor 182
idealhnf0 217
idealhnf 308
idealprodprime 336
idealprod 462
famat_to_Fp_coprime 693
vecinv 770
vecdiv 903
idealprodval 2806
idealdown 2982
idealispower 3660
idealdivexact 4404
gpidealval 7119
ramified_root 7257
idealsqrtn_int 7264
idealdivpowprime 9997
famat_div_shallow 10304
idealred_elt 10886
make_integral 10920
_mul 11382
nf_get_Gtwist1 12583
twistG 12625
famatV_factorback 13759
idealmulred 17207
pr_inv 18257
idealaddtoone_i 19768
famat_to_nf_moddivisor 20118
ext_inv 20368
famat_sub 20846
famat_sqr 22943
idealfactor_partial 25424
Q_nffactor 26903
famat_inv_shallow 26968
prV_e_muls 27520
_idealmulred 28589
ext_sqr 33891
_idealsqrred 35676
_sqr 35676
idealcoprimefact 37204
idealsqr 38560
idealsqr_aux 38560
pr_inv_p 39362
idealdiv 39792
famatV_zv_factorback 46529
idealredmodpower 48621
famat_remove_trivial 53614
idealapprfact_i 53889
factorbackprime 57565
pr_uniformizer 57953
prV_primes 60501
famat_pow 60642
ext_mul 60758
famat_pow_shallow 62037
addmul_mat 67495
idealHNF_inv 78908
idealpowred 80202
prV_lcm_capZ 81847
famat_mulpow_shallow 88316
p_makecoprime 88856
RM_round_maxrank 96369
idealredmodpower_i 97230
idealnorm 99885
idealtwoelt 102866
idealadd 108265
famat_mulpows_shallow 117984
nf_to_Fp_coprime 119252
get_random_a 121847
to_Fp_coprime 122430
famat_pows_shallow 122845
idealred0 138598
nf_get_Gtwist 138605
idealpseudomin 139964
idealinv 149137
append 151946
famat_add 158599
famatsmall_reduce 176591
vecsqr 193473
Q_to_famat 197053
famat_inv 199313
famat_mul_shallow 199533
famat_div 200051
idealHNF_inv_Z 217561
ok_elt 229545
idealHNF_factor 239089
mat_ideal_two_elt 257754
idealfactor 265716
idealfactor_limit 266094
idealpows 274577
idealsqrprime 281915
idealHNF_Z_factor_i 284532
idealHNF_factor_i 284532
famat_reduce 295256
idealmulelt 304682
Z_to_famat 376251
idealnumden 377910
idealHNF_mul 388693
Z_cba 412818
famat_mul 447353
Z_ppio 532721
ZM_famat_limit 568118
idealmul 575321
idealmul_aux 575321
idealhnf_two 683249
idealaddtoone_raw 712003
idealmulpowprime 729946
_idealaddtoone 731771
idealHNF_mul_two 799811
idealpow_aux 825408
idealpow 825410
idealpowprime 1104810
idealpseudominvec 1204391
idealpseudored 1284125
idealhnf_principal 1366635
lcmuu 1508587
idealhnf_shallow 1743756
famat_makecoprime 2003515
to_famat_shallow 2688368
pr_hnf 3605922
Z_cba_rec 3764992
idealHNF_norm_pval 3990828
zk_pvalrem 4057092
nf_remove_denom_p 4102919
idealHNF_val 4127046
Fl_invgen 5555992
idealval 9470872
vecmul 15989472
idealtyp 16075772
Z_ppo 19910873
u_ppo 53891954

Generated by: LCOV version 1.16