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.1 lcov report (development 22708-0f0e6fe44) Lines: 1516 1665 91.1 %
Date: 2018-06-18 05:36:21 Functions: 87 92 94.6 %
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 7
hnflll 7
hnf 14
hnfall 14
hnfallgen 14
hnfmod 14
hnfperm 14
ZV_hnfgcdext 21
smithall 21
RgM_hnfall 35
RgM_reduce 42
gsmith 42
gsmithall_i 42
hnfdivide 91
gsnf_no_divide 112
ZM_hnf_knapsack 175
normalize_as_RgX 210
mathnf0 217
ZV_snf_trunc 224
ZM_hnfperm 259
gbezout_step 266
hnfspec 322
mathnfspec 322
smith 322
matsnf0 378
ZM_snf 427
smithclean 539
is_RgX 1001
ZM_hnfcenter 1673
ZM_hnfall 3589
ZM_snfall 8236
hnf_i 12394
ZV_allequal 14749
ZM_hnf 15402
hnfadd_i 19228
hnf_invscale 20825
hnfspec_i 24933
ZM_rowrankprofile 43804
hnffinal 44161
ZpM_echelon 48356
remove_0cols 48448
ZV_extgcd 50904
ZV_gcdext_i 50918
ZM_hnflll 53078
update 59125
ZV_snf_group 63315
ZV_snfall 63315
hnf_solve 63546
ZM_snf_group 64273
hnf_invimage 70007
ZM_snfall_i 76366
bezout_step 77234
reverse_rows 106156
ZM_hnfmod 112583
ZM_hnfall_i 116360
ZM_snfclean 127588
snf_group 127588
hnfmerge_get_1 129549
snf_pile 136033
count2 151436
hnf_divscale 156835
ZM_snf_no_divide 156887
col_mul 236500
hnfmodid 241107
allhnfmod 241121
negcmpii 362862
reduce1 368179
Minus 545073
col_dup 658380
zlm_echelon 797411
ZM_reduce 1352006
must_swap 1430431
FpM_echelon 1581984
FpM_hnfend 1581984
ZM_hnfmodprime 1581984
FpV_Fp_mul_part_ip 2666522
hnfswap 2898069
ZM_hnfmodid 2922880
ZM_hnfmodall 3277431
optimal_D 3281827
ZM_hnfmodall_i 3281890
count 3855469
reduce2 20580630
FpV_red_part_ipvec 21846176
ZC_elem 23600353
findi 41162169
findi_normalize 41162169

Generated by: LCOV version 1.13