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 20076-e66e249) Lines: 1302 1435 90.7 %
Date: 2017-01-17 05:50:07 Functions: 128 139 92.1 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
Q_nffactor 2961
RM_round_maxrank 32492
ZM_Q_mul 33534
ZM_famat_limit 48307
Z_cba 344001
Z_cba_rec 3063319
Z_dcba_rec 0
Z_ppgle 0
Z_ppio 452179
Z_ppo 352232
_idealmulred 45090
_idealsqrred 65979
_mul 28664
_sqr 65979
addmul_col 60230
addmul_mat 25766
append 62528
chk_vdir 21
err_divexact 7
ext_inv 4224
ext_mul 166236
ext_pow 421
ext_sqr 65923
factorbackprime 5061
famat_Z_gcd 0
famat_add 86631
famat_inv 4364
famat_inv_shallow 25109
famat_makecoprime 105865
famat_mul 113099
famat_mul_shallow 99411
famat_mulpow_shallow 59003
famat_pow 421
famat_pow_shallow 57218
famat_reduce 2646
famat_sqr 55360
famat_to_Fp_coprime 785
famat_to_nf 0
famat_to_nf_moddivisor 1071
famatsmall_reduce 12682
get_random_a 117056
gpidealval 13426
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 30923
idealHNF_inv_Z 161799
idealHNF_mul 416932
idealHNF_mul_two 740378
idealHNF_norm_pval 99499
idealHNF_val 113701
idealadd 28252
idealaddmultoone 35
idealaddtoone 2842
idealaddtoone0 70
idealaddtoone_i 152621
idealappr 14
idealappr0 14
idealapprfact 0
idealapprfact_i 10724
idealcoprime 70
idealcoprimefact 3444
idealdiv 13755
idealdiv0 42
idealdivexact 581
idealdivpowprime 4816
idealfactor 18333
idealhnf 2590
idealhnf0 119
idealhnf_principal 203663
idealhnf_shallow 321452
idealhnf_two 1261612
idealintersect 21
idealinv 46042
idealmin 7
idealmul 532859
idealmul0 56
idealmul_aux 532859
idealmulelt 129154
idealmulpowprime 34811
idealmulred 16426
idealnorm 5565
idealnumden 15470
idealpow 157650
idealpow0 42
idealpow_aux 157650
idealpowprime 49390
idealpowred 68948
idealpows 14457
idealprod 1141
idealprodprime 126
idealred0 177497
idealsqr 66357
idealsqr_aux 66357
idealsqrprime 37802
idealtwoelt 24570
idealtwoelt0 63
idealtwoelt2 42
idealtyp 2517248
idealval 324719
in_ideal 28
isideal 91
make_integral 2002
mat_ideal_two_elt 321120
mat_ideal_two_elt2 21
nf_coprime_part 7
nf_get_Gtwist 177504
nf_get_Gtwist1 26941
nf_remove_denom_p 245911
nf_to_Fp_coprime 4254
nfdivmodpr 0
nfkermodpr 0
nfmulmodpr 7
nfpowmodpr 0
nfsolvemodpr 0
not_in_ideal 14
ok_elt 185324
p_makecoprime 58233
prV_e_muls 2968
prV_lcm_capZ 11627
pr_inv 1379
pr_inv_p 39362
pr_uniformizer 11578
to_Fp_coprime 5099
to_famat 0
to_famat_shallow 796223
trivial_merge 28
twistG 26983
u_ppo 130046
vec_mulid 7
vecdiv 903
vecinv 0
vecmul 178024
vecpow 15729
zk_pvalrem 123768

Generated by: LCOV version 1.11