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-bordeaux1.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 17707-04f73e4) Lines: 1339 1428 93.8 %
Date: 2015-03-29 Functions: 124 131 94.7 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 795 948 83.9 %

Function Name Sort by function name Hit count Sort by hit count
RM_round_maxrank 30165
ZM_Q_mul 48737
ZM_famat_limit 7413
_idealmulred 44849
_idealsqrred 65795
_mul 28554
_sqr 65795
addmul_col 56289
addmul_mat 25380
append 99412
check_listpr 756
chk_vdir 21
coprime_part 4142
elt_cmp 19962
elt_egal 6072
err_divexact 7
ext_inv 4469
ext_mul 165522
ext_pow 266
ext_sqr 65781
extideal_HNF_mul 18863
factor_norm 26639
factorbackprime 6440
famat_Z_gcd 0
famat_add 122906
famat_inv 4609
famat_inv_shallow 7
famat_makecoprime 98637
famat_mul 176955
famat_mul_shallow 3024
famat_pow 2863
famat_reduce 7140
famat_sqr 55232
famat_to_Fp_simple 385
famat_to_Fq_simple 0
famat_to_nf 0
famat_to_nf_moddivisor 12418
famatsmall_reduce 8805
get_random_a 165512
gpidealval 42
hnf_QC_QC 7
hnf_Q_Q 21
hnf_Q_QC 28
hnf_Z_QC 21
hnf_Z_ZC 28
idealadd 28212
idealaddmultoone 35
idealaddtoone 2712
idealaddtoone0 70
idealaddtoone_i 182560
idealappr 770
idealappr0 14
idealapprfact 756
idealapprfact_i 17539
idealchinese 1449
idealcoprime 63
idealcoprimefact 5089
idealdiv 15519
idealdiv0 35
idealdivexact 2226
idealdivpowprime 3990
idealfactor 28844
idealfactor_HNF 26639
idealhnf 2653
idealhnf0 119
idealhnf_principal 139026
idealhnf_shallow 275937
idealhnf_two 1288436
idealintersect 21
idealinv 48106
idealinv_HNF 32249
idealinv_HNF_aux 32893
idealmin 7
idealmul 526717
idealmul0 28
idealmul_HNF 349164
idealmul_HNF_two 688598
idealmul_aux 592512
idealmulelt 138506
idealmulpowprime 37779
idealmulred 16295
idealnorm 10093
idealnumden 26667
idealpow 330223
idealpow0 42
idealpow_aux 330223
idealpowprime 233828
idealpowred 53293
idealpows 13482
idealprodprime 0
idealred0 149768
idealsqr 65795
idealtwoelt 14727
idealtwoelt0 63
idealtwoelt2 42
idealtyp 2705463
idealval 347601
init_unif_mod_fZ 21970
isideal 84
make_integral 4416
mat_ideal_two_elt 344643
mat_ideal_two_elt2 21
merge_fact 21
nf_coprime_part 112
nf_get_Gtwist 21
nf_get_Gtwist1 26196
nf_to_Fp_simple 3640
nf_to_Fq_simple 0
nfdivmodpr 588
nfkermodpr 14
nfmulmodpr 595
nfpowmodpr 168
nfsolvemodpr 21
not_in_ideal 14
ok_elt 208577
pidealprimeinv 1727
to_Fp_simple 3444
to_Fq_simple 0
to_famat 770
to_famat_shallow 58367
trivial_merge 28
twistG 26238
ucoprime_part 473249
unif_mod_fZ 31312
unnf_minus_x 172599
val_norm 368745
vec_mulid 7
vecdiv 903
vecinv 0
vecmul 177527
vecpow 15127

Generated by: LCOV version 1.9