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 - hnf_snf.c (source / functions) Hit Total Coverage
Test: PARI/GP v2.10.0 lcov report (development 20459-9710128) Lines: 1485 1637 90.7 %
Date: 2017-04-28 05:33:48 Functions: 84 89 94.4 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
do_zero 0
gsmithall 0
hnfadd 0
p_mat 0
trivsmith 0
RgC_elem 6
hnfallgen 6
hnflll 6
hnf 12
hnfall 12
hnfmod 12
hnfperm 12
RgM_hnfall 18
ZV_hnfgcdext 18
smithall 18
RgM_reduce 24
gsmith 36
gsmithall_i 36
hnfdivide 78
gsnf_no_divide 96
ZM_hnf_knapsack 126
mathnf0 132
RgX_normalize_all 144
ZM_snf 186
ZV_snf_trunc 192
ZM_hnfperm 198
gbezout_step 228
hnfspec 276
mathnfspec 276
smith 276
matsnf0 324
smithclean 462
is_RgX 798
ZM_hnfcenter 912
ZM_snfall 1824
ZM_hnfall 2586
ZV_snf_group 4692
ZV_snfall 4692
hnf_i 5508
ZM_hnf 7542
hnf_solve 11106
hnf_invscale 11118
ZV_extgcd 12210
ZV_gcdext_i 12222
hnfadd_i 15025
hnf_invimage 15972
remove_0cols 16092
ZpM_echelon 35490
update 36474
hnfspec_i 37032
ZM_rowrankprofile 51859
hnffinal 52057
ZM_snf_group 53118
bezout_step 53994
ZM_hnflll 54433
snf_pile 55434
ZM_snfclean 57810
snf_group 57810
ZM_snfall_i 58098
ZM_hnfmod 60648
hnfmodid 77070
allhnfmod 77082
ZM_hnfall_i 83106
count2 105631
reverse_rows 108866
ZM_snf_no_divide 111924
hnfmerge_get_1 126084
hnf_divscale 128172
col_mul 145896
negcmpii 206923
reduce1 225546
zlm_echelon 609190
Minus 615097
col_dup 705942
ZM_reduce 1057128
FpM_hnfend 1106241
FpM_echelon 1111623
ZM_hnfmodprime 1111623
ZM_hnfmodid 1246344
ZM_hnfmodall 1384332
ZM_hnfmodall_i 1388010
FpV_Fp_mul_part_ip 2107806
hnfswap 2646264
count 2722827
FpV_red_part_ipvec 6257628
ZC_elem 11453483
reduce2 16351829
findi 32704012
findi_normalize 32704012

Generated by: LCOV version 1.11