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 18946-c0ba5ba) Lines: 1413 1507 93.8 %
Date: 2016-05-26 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 31205
ZM_Q_mul 45869
ZM_famat_limit 60879
_idealmulred 44800
_idealsqrred 65394
_mul 28546
_sqr 65394
addmul_col 47572
addmul_mat 23583
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 26502
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 169347
gpidealval 42
hnf_QC_QC 7
hnf_Q_Q 21
hnf_Q_QC 28
hnf_Z_QC 21
hnf_Z_ZC 28
idealadd 29246
idealaddmultoone 35
idealaddtoone 2953
idealaddtoone0 70
idealaddtoone_i 183018
idealappr 784
idealappr0 14
idealapprfact 770
idealapprfact_i 15925
idealchinese 2723
idealcoprime 63
idealcoprimefact 4711
idealdiv 15379
idealdiv0 35
idealdivexact 2135
idealdivpowprime 4088
idealfactor 29127
idealfactor_HNF 26502
idealhnf 2051
idealhnf0 119
idealhnf_principal 182180
idealhnf_shallow 319841
idealhnf_two 1409286
idealintersect 21
idealinv 48661
idealinv_HNF 32681
idealinv_HNF_aux 33241
idealmin 7
idealmul 519590
idealmul0 28
idealmul_HNF 354121
idealmul_HNF_two 691242
idealmul_aux 584984
idealmulelt 136503
idealmulpowprime 37744
idealmulred 16254
idealnorm 10534
idealnumden 26628
idealpow 357674
idealpow0 42
idealpow_aux 357674
idealpowprime 231193
idealpowred 71279
idealpows 14588
idealprodprime 0
idealred0 169087
idealsqr 65394
idealtwoelt 19655
idealtwoelt0 63
idealtwoelt2 42
idealtyp 2766838
idealval 342614
init_unif_mod_fZ 21098
is_chineseinit 2695
isideal 84
isprfact 1309
make_integral 3689
mat_ideal_two_elt 344876
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 211918
pidealprimeinv 1951
pl_normalize 595
pr_init 1309
to_Fp_simple 3444
to_Fq_simple 0
to_famat 910
to_famat_shallow 511435
trivial_merge 28
twistG 26172
ucoprime_part 168532
unif_mod_fZ 28980
unnf_minus_x 174002
val_norm 361647
vec_mulid 7
vecdiv 903
vecinv 0
vecmul 177947
vecpow 15792

Generated by: LCOV version 1.9