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 19623-dc26710) Lines: 1459 1594 91.5 %
Date: 2016-09-30 05:54:20 Functions: 134 144 93.1 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
RM_round_maxrank 32192
ZM_Q_mul 35830
ZM_famat_limit 60546
Z_cba 343917
Z_cba_rec 3062507
Z_dcba_rec 0
Z_ppgle 0
Z_ppio 452088
_idealmulred 45461
_idealsqrred 66315
_mul 28783
_sqr 66315
addmul_col 61660
addmul_mat 26933
append 102065
chineseinit_i 1393
chk_vdir 21
coprime_part 352820
elt_cmp 20559
elt_egal 5970
err_divexact 7
ext_inv 4763
ext_mul 177525
ext_pow 400
ext_sqr 66259
extideal_HNF_mul 18735
factor_norm 22192
factorbackprime 6104
famat_Z_gcd 0
famat_add 128081
famat_inv 4903
famat_inv_shallow 7
famat_makecoprime 95861
famat_mul 182652
famat_mul_shallow 2996
famat_pow 3118
famat_reduce 7973
famat_sqr 55696
famat_to_Fp_coprime 789
famat_to_nf 0
famat_to_nf_moddivisor 15295
famatsmall_reduce 8806
get_random_a 213915
gpidealval 42
hnf_QC_QC 7
hnf_Q_Q 21
hnf_Q_QC 28
hnf_Z_QC 21
hnf_Z_ZC 28
idealadd 29281
idealaddmultoone 35
idealaddtoone 2856
idealaddtoone0 70
idealaddtoone_i 317650
idealappr 819
idealappr0 0
idealapprfact 791
idealapprfact_i 17880
idealchinese 2807
idealcoprime 63
idealcoprimefact 4725
idealdiv 15134
idealdiv0 42
idealdivexact 2184
idealdivpowprime 4305
idealfactor 25083
idealfactor_HNF 22192
idealhnf 2156
idealhnf0 119
idealhnf_principal 182548
idealhnf_shallow 450277
idealhnf_two 1876056
idealintersect 21
idealinv 49080
idealinv_HNF 33168
idealinv_HNF_Z 159838
idealmin 7
idealmul 541423
idealmul0 56
idealmul_HNF 580631
idealmul_HNF_two 904101
idealmul_aux 541423
idealmulelt 136483
idealmulpowprime 38153
idealmulred 16678
idealnorm 8618
idealnumden 22318
idealpow 398725
idealpow0 42
idealpow_aux 398725
idealpowprime 233868
idealpowred 72896
idealpows 8437
idealprod 1134
idealprodprime 126
idealred0 172738
idealsqr 66686
idealsqr_aux 66686
idealsqrprime 79949
idealtwoelt 23263
idealtwoelt0 63
idealtwoelt2 42
idealtyp 3129307
idealval 350501
in_ideal 28
is_chineseinit 2758
isideal 91
isprfact 1330
make_integral 3367
mat_ideal_two_elt 486221
mat_ideal_two_elt2 21
merge_fact 21
nf_coprime_part 14
nf_get_Gtwist 172745
nf_get_Gtwist1 26893
nf_remove_denom_p 239140
nf_to_Fp_coprime 4256
nfdivmodpr 0
nfkermodpr 0
nfmulmodpr 7
nfpowmodpr 0
nfsolvemodpr 0
not_in_ideal 14
ok_elt 282831
p_makecoprime 51465
pl_normalize 595
prV_lcm_capZ 23109
pr_init 1330
pr_inv 1372
pr_inv_p 39306
pr_uniformizer 25627
to_Fp_coprime 5096
to_famat 910
to_famat_shallow 720560
trivial_merge 28
twistG 26935
ucoprime_part 161847
val_norm 371209
vec_mulid 7
vecdiv 903
vecinv 0
vecmul 178024
vecpow 15729
zk_pvalrem 131128

Generated by: LCOV version 1.11