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 29465-f396510193) Lines: 1693 1845 91.8 %
Date: 2024-07-25 09:03:53 Functions: 170 185 91.9 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
Fl_invgen 5555804
Q_nffactor 26889
Q_to_famat 197053
RM_round_maxrank 96368
ZM_famat_limit 568118
ZV_cba 28
ZV_cba_extend 35
Z_cba 412818
Z_cba_rec 3764992
Z_dcba_rec 0
Z_ppgle 0
Z_ppio 532721
Z_ppo 19910871
Z_to_famat 376251
_idealaddtoone 731756
_idealmulred 28589
_idealsqrred 35676
_mul 11382
_sqr 35676
addmul_mat 67242
append 151946
chk_vdir 21
err_divexact 7
ext_inv 20368
ext_mul 60758
ext_pow 0
ext_sqr 33891
factorbackprime 57566
famatV_factorback 13759
famatV_zv_factorback 46529
famat_Z_gcd 0
famat_add 158599
famat_div 200051
famat_div_shallow 10304
famat_idealfactor 0
famat_inv 199313
famat_inv_shallow 26968
famat_makecoprime 2003517
famat_mul 447356
famat_mul_shallow 199531
famat_mulpow_shallow 88316
famat_mulpows_shallow 117984
famat_pow 60642
famat_pow_shallow 62037
famat_pows_shallow 122844
famat_reduce 295256
famat_remove_trivial 53617
famat_sqr 22943
famat_sub 20846
famat_to_Fp_coprime 693
famat_to_nf 0
famat_to_nf_moddivisor 20118
famatsmall_reduce 176591
get_random_a 121850
gpidealfactor 182
gpidealval 7119
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 284527
idealHNF_factor 239087
idealHNF_factor_i 284526
idealHNF_inv 78908
idealHNF_inv_Z 217559
idealHNF_mul 388688
idealHNF_mul_two 799787
idealHNF_norm_pval 3990831
idealHNF_val 4127061
idealadd 108265
idealaddmultoone 35
idealaddtoone 98
idealaddtoone0 70
idealaddtoone_i 19768
idealaddtoone_raw 711987
idealappr 14
idealappr0 14
idealapprfact 0
idealapprfact_i 53890
idealcoprime 84
idealcoprimefact 37205
idealdiv 39792
idealdiv0 56
idealdivexact 4404
idealdivpowprime 9997
idealdown 2982
idealfactor 265710
idealfactor_limit 266087
idealfactor_partial 25424
idealhnf 308
idealhnf0 217
idealhnf_principal 1366633
idealhnf_shallow 1743755
idealhnf_two 683238
idealintersect 21
idealinv 149137
idealismaximal 70
idealismaximal_i 70
idealismaximal_int 35
idealismaximal_mat 21
idealispower 3660
idealmin 7
idealmul 575318
idealmul0 70
idealmul_aux 575318
idealmulelt 304682
idealmulpowprime 729980
idealmulred 17207
idealnorm 99885
idealnumden 377912
idealpow 825414
idealpow0 84
idealpow_aux 825415
idealpowprime 1104848
idealpowred 80201
idealpows 274581
idealprod 462
idealprodprime 336
idealprodval 2806
idealpseudomin 139964
idealpseudomin_nonscalar 0
idealpseudominvec 1204390
idealpseudored 1284121
idealred0 138598
idealred_elt 10886
idealredmodpower 48622
idealredmodpower_i 97230
idealsqr 38560
idealsqr_aux 38560
idealsqrprime 281923
idealsqrtn_int 7264
idealtwoelt 102866
idealtwoelt0 70
idealtwoelt2 42
idealtyp 16075702
idealval 9470770
in_ideal 28
isideal 91
lcmuu 1508567
make_integral 10920
mat_ideal_two_elt 257753
mat_ideal_two_elt2 21
matreduce 63
nfV_eltembed 84
nfV_idealhnf 84
nf_coprime_part 126
nf_get_Gtwist 138605
nf_get_Gtwist1 12583
nf_remove_denom_p 4102902
nf_to_Fp_coprime 119251
nfdivmodpr 0
nfkermodpr 0
nfmulmodpr 7
nfpowmodpr 0
nfsolvemodpr 0
nfweilheight 84
nfweilheight_i 84
not_in_ideal 14
ok_elt 229425
p_makecoprime 88856
prV_e_muls 27485
prV_lcm_capZ 81848
prV_primes 60500
pr_hnf 3605906
pr_inv 18257
pr_inv_p 39361
pr_uniformizer 57953
ramified_root 7257
ramified_root_simple 7
sunits_makecoprime 98
to_Fp_coprime 122429
to_famat 0
to_famat_shallow 2688365
trivial_merge 28
twistG 12625
u_ppo 53891770
vec_mulid 91
vecdiv 903
vecinv 770
vecmul 16004952
vecpow 0
vecsqr 185815
zk_pvalrem 4057079

Generated by: LCOV version 1.16