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 19834-0e97742) Lines: 1302 1437 90.6 %
Date: 2016-12-09 05:49:11 Functions: 128 139 92.1 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
Q_nffactor 2898
RM_round_maxrank 32324
ZM_Q_mul 33499
ZM_famat_limit 48307
Z_cba 343959
Z_cba_rec 3062871
Z_dcba_rec 0
Z_ppgle 0
Z_ppio 452130
Z_ppo 352190
_idealmulred 45342
_idealsqrred 66105
_mul 28664
_sqr 66105
addmul_col 58298
addmul_mat 25003
append 62906
chk_vdir 21
err_divexact 7
ext_inv 4476
ext_mul 166866
ext_pow 421
ext_sqr 66049
factorbackprime 5005
famat_Z_gcd 0
famat_add 87261
famat_inv 4616
famat_inv_shallow 25109
famat_makecoprime 92502
famat_mul 113729
famat_mul_shallow 86328
famat_mulpow_shallow 59003
famat_pow 421
famat_pow_shallow 57218
famat_reduce 2569
famat_sqr 55486
famat_to_Fp_coprime 791
famat_to_nf 0
famat_to_nf_moddivisor 1008
famatsmall_reduce 12678
get_random_a 117063
gpidealval 42
hnf_QC_QC 7
hnf_Q_Q 21
hnf_Q_QC 28
hnf_Z_QC 21
hnf_Z_ZC 28
idealHNF_Z_factor 15246
idealHNF_factor 15246
idealHNF_inv 31140
idealHNF_inv_Z 162618
idealHNF_mul 417716
idealHNF_mul_two 741449
idealHNF_norm_pval 99016
idealHNF_val 113218
idealadd 28224
idealaddmultoone 35
idealaddtoone 2842
idealaddtoone0 70
idealaddtoone_i 152607
idealappr 14
idealappr0 14
idealapprfact 0
idealapprfact_i 10724
idealcoprime 70
idealcoprimefact 3444
idealdiv 13748
idealdiv0 42
idealdivexact 574
idealdivpowprime 4795
idealfactor 18165
idealhnf 2590
idealhnf0 119
idealhnf_principal 180829
idealhnf_shallow 285556
idealhnf_two 1237325
idealintersect 21
idealinv 46245
idealmin 7
idealmul 533048
idealmul0 56
idealmul_aux 533048
idealmulelt 129140
idealmulpowprime 34783
idealmulred 16678
idealnorm 5439
idealnumden 15372
idealpow 157349
idealpow0 42
idealpow_aux 157349
idealpowprime 49264
idealpowred 69200
idealpows 14268
idealprod 1134
idealprodprime 126
idealred0 178127
idealsqr 66476
idealsqr_aux 66476
idealsqrprime 37795
idealtwoelt 24395
idealtwoelt0 63
idealtwoelt2 42
idealtyp 2489598
idealval 310236
in_ideal 28
isideal 91
make_integral 2002
mat_ideal_two_elt 321064
mat_ideal_two_elt2 21
nf_coprime_part 7
nf_get_Gtwist 178134
nf_get_Gtwist1 26941
nf_remove_denom_p 232548
nf_to_Fp_coprime 4254
nfdivmodpr 0
nfkermodpr 0
nfmulmodpr 7
nfpowmodpr 0
nfsolvemodpr 0
not_in_ideal 14
ok_elt 185156
p_makecoprime 58233
prV_e_muls 2898
prV_lcm_capZ 11578
pr_inv 1379
pr_inv_p 39355
pr_uniformizer 11578
to_Fp_coprime 5104
to_famat 0
to_famat_shallow 783084
trivial_merge 28
twistG 26983
u_ppo 130046
vec_mulid 7
vecdiv 903
vecinv 0
vecmul 178024
vecpow 15729
zk_pvalrem 110405

Generated by: LCOV version 1.11