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.10.0 lcov report (development 20459-9710128) Lines: 1314 1447 90.8 %
Date: 2017-04-28 05:33:48 Functions: 131 142 92.3 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
Q_nffactor 2544
RM_round_maxrank 27834
ZM_Q_mul 33084
ZM_famat_limit 41346
Z_cba 294966
Z_cba_rec 2626542
Z_dcba_rec 0
Z_ppgle 0
Z_ppio 387648
Z_ppo 301920
_idealaddtoone 123720
_idealmulred 36396
_idealsqrred 52260
_mul 22380
_sqr 52260
addmul_col 45252
addmul_mat 19746
append 50418
chk_vdir 18
err_divexact 6
ext_inv 3582
ext_mul 119388
ext_pow 348
ext_sqr 52212
factorbackprime 4344
famat_Z_gcd 0
famat_add 69192
famat_inv 3702
famat_inv_shallow 21522
famat_makecoprime 84462
famat_mul 89640
famat_mul_shallow 75672
famat_mulpow_shallow 50580
famat_pow 348
famat_pow_shallow 49038
famat_reduce 2268
famat_sqr 43152
famat_to_Fp_coprime 677
famat_to_nf 0
famat_to_nf_moddivisor 924
famatsmall_reduce 10846
get_random_a 66582
gpidealval 5634
hnf_QC_QC 6
hnf_Q_Q 18
hnf_Q_QC 24
hnf_Z_QC 18
hnf_Z_ZC 24
idealHNF_Z_factor 12132
idealHNF_factor 12132
idealHNF_inv 26580
idealHNF_inv_Z 130146
idealHNF_mul 220230
idealHNF_mul_two 491892
idealHNF_norm_pval 91386
idealHNF_val 102216
idealadd 24192
idealaddmultoone 30
idealaddtoone 84
idealaddtoone0 60
idealaddtoone_i 6426
idealaddtoone_raw 117294
idealappr 12
idealappr0 12
idealapprfact 0
idealapprfact_i 8178
idealcoprime 60
idealcoprimefact 2958
idealdiv 11796
idealdiv0 36
idealdivexact 498
idealdivpowprime 4134
idealfactor 14700
idealhnf 2220
idealhnf0 102
idealhnf_principal 153294
idealhnf_shallow 247530
idealhnf_two 67938
idealintersect 18
idealinv 39390
idealmin 6
idealmul 450660
idealmul0 48
idealmul_aux 450660
idealmulelt 110268
idealmulpowprime 29958
idealmulred 14016
idealnorm 4758
idealnumden 12240
idealpow 134478
idealpow0 36
idealpow_aux 134478
idealpowprime 42360
idealpowred 41310
idealpows 12546
idealprod 978
idealprodprime 108
idealred0 127506
idealsqr 52584
idealsqr_aux 52584
idealsqrprime 30708
idealtwoelt 20712
idealtwoelt0 54
idealtwoelt2 36
idealtyp 2091546
idealval 273408
in_ideal 24
isideal 78
make_integral 1662
mat_ideal_two_elt 143586
mat_ideal_two_elt2 18
nf_coprime_part 6
nf_get_Gtwist 127512
nf_get_Gtwist1 23010
nf_remove_denom_p 204984
nf_to_Fp_coprime 3646
nfdivmodpr 0
nfkermodpr 0
nfmulmodpr 6
nfpowmodpr 0
nfsolvemodpr 0
not_in_ideal 12
ok_elt 129000
p_makecoprime 49950
prV_e_muls 2544
prV_lcm_capZ 8952
pr_hnf 970635
pr_inv 1164
pr_inv_p 17724
pr_uniformizer 8742
to_Fp_coprime 4386
to_famat 0
to_famat_shallow 674868
trivial_merge 24
twistG 23046
u_ppo 26222748
vec_mulid 6
vecdiv 774
vecinv 0
vecmul 152592
vecpow 13482
zk_pvalrem 100242

Generated by: LCOV version 1.11