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 19357-d770f77) Lines: 1406 1549 90.8 %
Date: 2016-08-27 06:11:27 Functions: 127 138 92.0 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
RM_round_maxrank 31951
ZM_Q_mul 35495
ZM_famat_limit 60844
Z_cba 343504
Z_cba_rec 3058286
Z_dcba_rec 0
Z_ppgle 0
Z_ppio 451654
_idealmulred 44986
_idealsqrred 65516
_mul 28584
_sqr 65516
addmul_col 60368
addmul_mat 25091
append 101481
check_listpr 0
chineseinit_i 1379
chk_vdir 21
coprime_part 352407
elt_cmp 20602
elt_egal 6027
err_divexact 7
ext_inv 4302
ext_mul 176168
ext_pow 289
ext_sqr 65502
extideal_HNF_mul 18869
factor_norm 22123
factorbackprime 6013
famat_Z_gcd 0
famat_add 126495
famat_inv 4442
famat_inv_shallow 7
famat_makecoprime 95865
famat_mul 180693
famat_mul_shallow 3073
famat_pow 3026
famat_reduce 7903
famat_sqr 54953
famat_to_Fp_coprime 789
famat_to_nf 0
famat_to_nf_moddivisor 15015
famatsmall_reduce 8806
get_random_a 211758
gpidealval 42
hnf_QC_QC 7
hnf_Q_Q 21
hnf_Q_QC 28
hnf_Z_QC 21
hnf_Z_ZC 28
idealadd 29379
idealaddmultoone 35
idealaddtoone 2807
idealaddtoone0 70
idealaddtoone_i 316600
idealappr 791
idealappr0 0
idealapprfact 763
idealapprfact_i 17167
idealchinese 2751
idealcoprime 63
idealcoprimefact 4711
idealdiv 15211
idealdiv0 42
idealdivexact 2100
idealdivpowprime 4109
idealfactor 24643
idealfactor_HNF 22123
idealhnf 2240
idealhnf0 119
idealhnf_principal 183636
idealhnf_shallow 449257
idealhnf_two 1894116
idealintersect 21
idealinv 48717
idealinv_HNF 32676
idealinv_HNF_Z 156824
idealmin 7
idealmul 530389
idealmul0 28
idealmul_HNF 613849
idealmul_HNF_two 949060
idealmul_aux 595905
idealmulelt 136223
idealmulpowprime 37807
idealmulred 16402
idealnorm 8085
idealnumden 22249
idealpow 398172
idealpow0 42
idealpow_aux 398172
idealpowprime 232923
idealpowred 71566
idealpows 8050
idealprod 763
idealprodprime 126
idealred0 169759
idealsqr 65516
idealtwoelt 20653
idealtwoelt0 63
idealtwoelt2 42
idealtyp 3081737
idealval 337038
init_unif_mod_fZ 22340
is_chineseinit 2716
isideal 91
isprfact 1316
make_integral 3381
mat_ideal_two_elt 481061
mat_ideal_two_elt2 21
merge_fact 21
nf_coprime_part 14
nf_get_Gtwist 169766
nf_get_Gtwist1 26827
nf_to_Fp_coprime 4256
nfdivmodpr 0
nfkermodpr 0
nfmulmodpr 7
nfpowmodpr 0
nfsolvemodpr 0
not_in_ideal 14
ok_elt 277737
pidealprimeinv 40287
pl_normalize 595
pr_init 1316
to_Fp_coprime 5111
to_famat 910
to_famat_shallow 720476
trivial_merge 28
twistG 26869
ucoprime_part 161847
unif_mod_fZ 24636
val_norm 356662
vec_mulid 7
vecdiv 903
vecinv 0
vecmul 178024
vecpow 15729

Generated by: LCOV version 1.11