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 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.10.0 lcov report (development 20422-b487f4d) Lines: 1314 1447 90.8 %
Date: 2017-03-22 05:51:54 Functions: 131 142 92.3 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
Q_nffactor 2968
RM_round_maxrank 32492
ZM_Q_mul 38602
ZM_famat_limit 48237
Z_cba 344127
Z_cba_rec 3064299
Z_dcba_rec 0
Z_ppgle 0
Z_ppio 452256
Z_ppo 352288
_idealaddtoone 144368
_idealmulred 42500
_idealsqrred 60981
_mul 26116
_sqr 60981
addmul_col 54983
addmul_mat 23931
append 58839
chk_vdir 21
err_divexact 7
ext_inv 4217
ext_mul 139353
ext_pow 421
ext_sqr 60925
factorbackprime 5068
famat_Z_gcd 0
famat_add 80769
famat_inv 4357
famat_inv_shallow 25109
famat_makecoprime 98627
famat_mul 104647
famat_mul_shallow 88315
famat_mulpow_shallow 59010
famat_pow 421
famat_pow_shallow 57211
famat_reduce 2646
famat_sqr 50355
famat_to_Fp_coprime 787
famat_to_nf 0
famat_to_nf_moddivisor 1078
famatsmall_reduce 12639
get_random_a 77682
gpidealval 6573
hnf_QC_QC 7
hnf_Q_Q 21
hnf_Q_QC 28
hnf_Z_QC 21
hnf_Z_ZC 28
idealHNF_Z_factor 14472
idealHNF_factor 14472
idealHNF_inv 31028
idealHNF_inv_Z 151966
idealHNF_mul 257385
idealHNF_mul_two 574444
idealHNF_norm_pval 107139
idealHNF_val 120586
idealadd 28224
idealaddmultoone 35
idealaddtoone 98
idealaddtoone0 70
idealaddtoone_i 7497
idealaddtoone_raw 136871
idealappr 14
idealappr0 14
idealapprfact 0
idealapprfact_i 9859
idealcoprime 70
idealcoprimefact 3451
idealdiv 13762
idealdiv0 42
idealdivexact 581
idealdivpowprime 4823
idealfactor 17468
idealhnf 2590
idealhnf0 119
idealhnf_principal 179121
idealhnf_shallow 289077
idealhnf_two 79697
idealintersect 21
idealinv 45993
idealmin 7
idealmul 526255
idealmul0 56
idealmul_aux 526255
idealmulelt 128734
idealmulpowprime 34951
idealmulred 16384
idealnorm 5607
idealnumden 14598
idealpow 157391
idealpow0 42
idealpow_aux 157391
idealpowprime 49817
idealpowred 48270
idealpows 14639
idealprod 1141
idealprodprime 126
idealred0 148897
idealsqr 61359
idealsqr_aux 61359
idealsqrprime 35863
idealtwoelt 24209
idealtwoelt0 63
idealtwoelt2 42
idealtyp 2443223
idealval 319387
in_ideal 28
isideal 91
make_integral 1939
mat_ideal_two_elt 167881
mat_ideal_two_elt2 21
nf_coprime_part 7
nf_get_Gtwist 148904
nf_get_Gtwist1 26864
nf_remove_denom_p 239324
nf_to_Fp_coprime 4262
nfdivmodpr 0
nfkermodpr 0
nfmulmodpr 7
nfpowmodpr 0
nfsolvemodpr 0
not_in_ideal 14
ok_elt 150817
p_makecoprime 58275
prV_e_muls 2968
prV_lcm_capZ 10762
pr_hnf 1133973
pr_inv 1379
pr_inv_p 20707
pr_uniformizer 10543
to_Fp_coprime 5112
to_famat 0
to_famat_shallow 787353
trivial_merge 28
twistG 26906
u_ppo 30593206
vec_mulid 7
vecdiv 903
vecinv 0
vecmul 178024
vecpow 15729
zk_pvalrem 117125

Generated by: LCOV version 1.11