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-bordeaux1.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.8.0 lcov report (development 17784-cfd2407) Lines: 1339 1428 93.8 %
Date: 2015-04-27 Functions: 124 131 94.7 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 795 948 83.9 %

Function Name Sort by function name Hit count Sort by hit count
RM_round_maxrank 30164
ZM_Q_mul 48711
ZM_famat_limit 34951
_idealmulred 44849
_idealsqrred 65794
_mul 28554
_sqr 65794
addmul_col 56350
addmul_mat 25411
append 99411
check_listpr 756
chk_vdir 21
coprime_part 4144
elt_cmp 19950
elt_egal 6069
err_divexact 7
ext_inv 4469
ext_mul 165521
ext_pow 266
ext_sqr 65780
extideal_HNF_mul 18863
factor_norm 26630
factorbackprime 6440
famat_Z_gcd 0
famat_add 122905
famat_inv 4609
famat_inv_shallow 7
famat_makecoprime 98637
famat_mul 176954
famat_mul_shallow 3024
famat_pow 2863
famat_reduce 7140
famat_sqr 55231
famat_to_Fp_simple 385
famat_to_Fq_simple 0
famat_to_nf 0
famat_to_nf_moddivisor 12418
famatsmall_reduce 8805
get_random_a 165485
gpidealval 42
hnf_QC_QC 7
hnf_Q_Q 21
hnf_Q_QC 28
hnf_Z_QC 21
hnf_Z_ZC 28
idealadd 28210
idealaddmultoone 35
idealaddtoone 2709
idealaddtoone0 70
idealaddtoone_i 182543
idealappr 770
idealappr0 14
idealapprfact 756
idealapprfact_i 17530
idealchinese 1449
idealcoprime 63
idealcoprimefact 5089
idealdiv 15519
idealdiv0 35
idealdivexact 2226
idealdivpowprime 3990
idealfactor 28835
idealfactor_HNF 26630
idealhnf 2653
idealhnf0 119
idealhnf_principal 139025
idealhnf_shallow 275923
idealhnf_two 1288387
idealintersect 21
idealinv 48107
idealinv_HNF 32247
idealinv_HNF_aux 32891
idealmin 7
idealmul 526706
idealmul0 28
idealmul_HNF 349112
idealmul_HNF_two 688537
idealmul_aux 592500
idealmulelt 138505
idealmulpowprime 37779
idealmulred 16295
idealnorm 10093
idealnumden 26658
idealpow 330223
idealpow0 42
idealpow_aux 330223
idealpowprime 233828
idealpowred 53293
idealpows 13482
idealprodprime 0
idealred0 149767
idealsqr 65794
idealtwoelt 14727
idealtwoelt0 63
idealtwoelt2 42
idealtyp 2705240
idealval 347457
init_unif_mod_fZ 21961
isideal 84
make_integral 4417
mat_ideal_two_elt 344606
mat_ideal_two_elt2 21
merge_fact 21
nf_coprime_part 112
nf_get_Gtwist 21
nf_get_Gtwist1 26195
nf_to_Fp_simple 3640
nf_to_Fq_simple 0
nfdivmodpr 588
nfkermodpr 14
nfmulmodpr 595
nfpowmodpr 168
nfsolvemodpr 21
not_in_ideal 14
ok_elt 208531
pidealprimeinv 1727
to_Fp_simple 3444
to_Fq_simple 0
to_famat 770
to_famat_shallow 58367
trivial_merge 28
twistG 26237
ucoprime_part 473249
unif_mod_fZ 31271
unnf_minus_x 172582
val_norm 368578
vec_mulid 7
vecdiv 903
vecinv 0
vecmul 177527
vecpow 15127

Generated by: LCOV version 1.9