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.8.0 lcov report (development 19053-42ab05e) Lines: 1413 1507 93.8 %
Date: 2016-06-29 Functions: 129 136 94.9 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 856 1030 83.1 %

Function Name Sort by function name Hit count Sort by hit count
RM_round_maxrank 31212
ZM_Q_mul 45982
ZM_famat_limit 60879
_idealmulred 44800
_idealsqrred 65394
_mul 28546
_sqr 65394
addmul_col 47516
addmul_mat 23562
append 96335
check_listpr 770
chineseinit_i 1372
chk_vdir 21
coprime_part 5242
elt_cmp 20818
elt_egal 6027
err_divexact 7
ext_inv 4238
ext_mul 184495
ext_pow 259
ext_sqr 65380
extideal_HNF_mul 18837
factor_norm 26537
factorbackprime 5964
famat_Z_gcd 0
famat_add 121117
famat_inv 4378
famat_inv_shallow 7
famat_makecoprime 95501
famat_mul 175108
famat_mul_shallow 3101
famat_pow 2989
famat_reduce 7875
famat_sqr 54831
famat_to_Fp_simple 385
famat_to_Fq_simple 0
famat_to_nf 0
famat_to_nf_moddivisor 15022
famatsmall_reduce 8806
get_random_a 169431
gpidealval 42
hnf_QC_QC 7
hnf_Q_Q 21
hnf_Q_QC 28
hnf_Z_QC 21
hnf_Z_ZC 28
idealadd 29302
idealaddmultoone 35
idealaddtoone 2981
idealaddtoone0 70
idealaddtoone_i 183046
idealappr 784
idealappr0 14
idealapprfact 770
idealapprfact_i 15925
idealchinese 2723
idealcoprime 63
idealcoprimefact 4711
idealdiv 15379
idealdiv0 35
idealdivexact 2135
idealdivpowprime 4088
idealfactor 29162
idealfactor_HNF 26537
idealhnf 2086
idealhnf0 119
idealhnf_principal 182264
idealhnf_shallow 319876
idealhnf_two 1416111
idealintersect 21
idealinv 48717
idealinv_HNF 32772
idealinv_HNF_aux 33332
idealmin 7
idealmul 519814
idealmul0 28
idealmul_HNF 354317
idealmul_HNF_two 691417
idealmul_aux 585208
idealmulelt 136559
idealmulpowprime 37744
idealmulred 16254
idealnorm 10541
idealnumden 26663
idealpow 357674
idealpow0 42
idealpow_aux 357674
idealpowprime 231193
idealpowred 71279
idealpows 14588
idealprodprime 0
idealred0 169087
idealsqr 65394
idealtwoelt 19662
idealtwoelt0 63
idealtwoelt2 42
idealtyp 2767692
idealval 342712
init_unif_mod_fZ 21098
is_chineseinit 2695
isideal 84
isprfact 1309
make_integral 3689
mat_ideal_two_elt 344974
mat_ideal_two_elt2 21
merge_fact 21
nf_coprime_part 49
nf_get_Gtwist 21
nf_get_Gtwist1 26130
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 211995
pidealprimeinv 1951
pl_normalize 595
pr_init 1309
to_Fp_simple 3444
to_Fq_simple 0
to_famat 910
to_famat_shallow 715058
trivial_merge 28
twistG 26172
ucoprime_part 161840
unif_mod_fZ 28980
unnf_minus_x 174030
val_norm 361815
vec_mulid 7
vecdiv 903
vecinv 0
vecmul 178087
vecpow 15792

Generated by: LCOV version 1.9