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 20277-2bd9113) Lines: 1302 1435 90.7 %
Date: 2017-02-21 05:49:51 Functions: 128 139 92.1 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
Q_nffactor 2968
RM_round_maxrank 32499
ZM_Q_mul 33534
ZM_famat_limit 48230
Z_cba 344043
Z_cba_rec 3063445
Z_dcba_rec 0
Z_ppgle 0
Z_ppio 452179
Z_ppo 352253
_idealmulred 45090
_idealsqrred 65979
_mul 28664
_sqr 65979
addmul_col 60265
addmul_mat 25808
append 62528
chk_vdir 21
err_divexact 7
ext_inv 4224
ext_mul 165802
ext_pow 421
ext_sqr 65923
factorbackprime 5061
famat_Z_gcd 0
famat_add 86631
famat_inv 4364
famat_inv_shallow 25109
famat_makecoprime 105522
famat_mul 113099
famat_mul_shallow 99068
famat_mulpow_shallow 59003
famat_pow 421
famat_pow_shallow 57218
famat_reduce 2646
famat_sqr 55360
famat_to_Fp_coprime 788
famat_to_nf 0
famat_to_nf_moddivisor 1071
famatsmall_reduce 12693
get_random_a 110231
gpidealval 13083
hnf_QC_QC 7
hnf_Q_Q 21
hnf_Q_QC 28
hnf_Z_QC 21
hnf_Z_ZC 28
idealHNF_Z_factor 15344
idealHNF_factor 15344
idealHNF_inv 30930
idealHNF_inv_Z 161806
idealHNF_mul 408602
idealHNF_mul_two 732048
idealHNF_norm_pval 99499
idealHNF_val 113701
idealadd 28252
idealaddmultoone 35
idealaddtoone 2842
idealaddtoone0 70
idealaddtoone_i 144284
idealappr 14
idealappr0 14
idealapprfact 0
idealapprfact_i 10731
idealcoprime 70
idealcoprimefact 3451
idealdiv 13755
idealdiv0 42
idealdivexact 581
idealdivpowprime 4816
idealfactor 18340
idealhnf 2590
idealhnf0 119
idealhnf_principal 201514
idealhnf_shallow 306829
idealhnf_two 1246374
idealintersect 21
idealinv 46049
idealmin 7
idealmul 532859
idealmul0 56
idealmul_aux 532859
idealmulelt 129154
idealmulpowprime 34811
idealmulred 16426
idealnorm 5586
idealnumden 15470
idealpow 157748
idealpow0 42
idealpow_aux 157748
idealpowprime 49488
idealpowred 68514
idealpows 14555
idealprod 1141
idealprodprime 126
idealred0 177063
idealsqr 66357
idealsqr_aux 66357
idealsqrprime 37809
idealtwoelt 24577
idealtwoelt0 63
idealtwoelt2 42
idealtyp 2499489
idealval 324362
in_ideal 28
isideal 91
make_integral 2002
mat_ideal_two_elt 312790
mat_ideal_two_elt2 21
nf_coprime_part 7
nf_get_Gtwist 177070
nf_get_Gtwist1 26941
nf_remove_denom_p 245568
nf_to_Fp_coprime 4254
nfdivmodpr 0
nfkermodpr 0
nfmulmodpr 7
nfpowmodpr 0
nfsolvemodpr 0
not_in_ideal 14
ok_elt 178520
p_makecoprime 58233
prV_e_muls 2968
prV_lcm_capZ 11634
pr_inv 1379
pr_inv_p 38928
pr_uniformizer 11578
to_Fp_coprime 5099
to_famat 0
to_famat_shallow 795880
trivial_merge 28
twistG 26983
u_ppo 130046
vec_mulid 7
vecdiv 903
vecinv 0
vecmul 178024
vecpow 15729
zk_pvalrem 123425

Generated by: LCOV version 1.11