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 18889-ac2cbba) Lines: 1413 1507 93.8 %
Date: 2016-05-01 Functions: 129 136 94.9 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 853 1030 82.8 %

Function Name Sort by function name Hit count Sort by hit count
RM_round_maxrank 31310
ZM_Q_mul 45581
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 26614
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 8805
get_random_a 168577
gpidealval 42
hnf_QC_QC 7
hnf_Q_Q 21
hnf_Q_QC 28
hnf_Z_QC 21
hnf_Z_ZC 28
idealadd 28952
idealaddmultoone 35
idealaddtoone 2764
idealaddtoone0 70
idealaddtoone_i 182829
idealappr 784
idealappr0 14
idealapprfact 770
idealapprfact_i 16037
idealchinese 2723
idealcoprime 63
idealcoprimefact 4711
idealdiv 15379
idealdiv0 35
idealdivexact 2135
idealdivpowprime 4088
idealfactor 29239
idealfactor_HNF 26614
idealhnf 2793
idealhnf0 119
idealhnf_principal 183790
idealhnf_shallow 320583
idealhnf_two 1409195
idealintersect 21
idealinv 48780
idealinv_HNF 32506
idealinv_HNF_aux 33066
idealmin 7
idealmul 521529
idealmul0 28
idealmul_HNF 353218
idealmul_HNF_two 690619
idealmul_aux 586923
idealmulelt 136307
idealmulpowprime 37744
idealmulred 16254
idealnorm 10905
idealnumden 26740
idealpow 357674
idealpow0 42
idealpow_aux 357674
idealpowprime 231193
idealpowred 71279
idealpows 14588
idealprodprime 0
idealred0 169087
idealsqr 65394
idealtwoelt 18766
idealtwoelt0 63
idealtwoelt2 42
idealtyp 2769820
idealval 342880
init_unif_mod_fZ 21210
is_chineseinit 2695
isideal 84
isprfact 1309
make_integral 3689
mat_ideal_two_elt 344204
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 211148
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 29204
unnf_minus_x 173813
val_norm 362102
vec_mulid 7
vecdiv 903
vecinv 0
vecmul 177947
vecpow 15792

Generated by: LCOV version 1.9