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 to exceed 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.16.2 lcov report (development 29463-1101ba1c32) Lines: 1612 1788 90.2 %
Date: 2024-07-22 09:03:30 Functions: 97 107 90.7 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
ZV_snf_trunc 0
do_zero 0
gsmith 0
gsmithall 0
hnfadd 0
hnfspec 0
mathnfspec 0
p_mat 0
trivsmith 0
zv_snf_rank 0
hnflll 7
hnf 14
hnfall 14
hnfmod 14
hnfperm 14
ZV_hnfgcdext 21
hnfallgen 21
smithall 35
RgM_hnfall 42
snf_pile1 48
RgXM_snf 49
ZV_snf_rank_u 49
RgM_reduce 84
ZV_snf_rank 91
hnfdivide 133
snfrank 154
gsnf_no_divide 196
ZM_hnf_knapsack 238
mathnf0 287
normalize_as_RgX 364
ZM_hnfperm 385
smith 385
matsnf0 469
RgC_elem 511
smithclean 693
gbezout_step 882
is_RgX 2590
ZM_snf 10808
ZM_hnfall 23913
ZM_hnfcenter 25088
hnf_i 56886
ZM_snfall 63861
hnfadd_i 64916
ZM_hnf 79322
ZV_extgcd 109144
ZV_gcdext_i 109158
hnfspec_i 134120
ZM_hnfmod 165156
hnf_divscale 197702
ZM_rowrankprofile 199043
hnffinal 199043
ZM_hnflll 204537
ZV_snfclean 214181
ZV_allequal 219797
hnf_invscale 236894
ZV_snf_group 303723
ZV_snfall 303723
remove_0cols 312004
hnf_solve 314896
hnf_invimage 366240
hnfmodid 399932
allhnfmod 399946
count2 407444
reverse_rows 409068
negcmpii 520083
ZpM_echelon 525047
ZM_snf_group 643076
update 673434
bezout_step 701528
ZM_hnfall_i 716913
ZM_snfall_i 721280
hnfmerge_get_1 741510
ZMrow_divexact_inplace 861791
ZM_snfclean 946867
snf_group 946872
reduce1 950454
snf_pile 983923
ZM_snf_no_divide 1075572
ZM_redpart 1386187
Minus 1995326
col_dup 2654730
col_mul 2693659
ZM_hnfmodprime 3170070
FpM_echelon 3170084
FpM_hnfend 3170228
ZM_reduce 4087438
ZM_hnfmodid 4141211
zlm_echelon 4650151
must_swap 4667786
ZM_hnfmodall 4707790
optimal_D 4754791
ZM_hnfmodall_i 4756904
FpV_Fp_mul_part_ip 5317150
subzi 6446149
count 7987392
affii_or_copy_gc 8315240
hnfswap 8322945
ZC_lincomb1z 21093873
ZC_lincomb1z_i 21098437
FpV_red_part_ipvec 34786912
ZC_elem 38694999
affii2_or_copy_gc 46576330
reduce2 52725104
findi_normalize 105460933
findi 105463114
addzi 228784092
addmulzii 507033674

Generated by: LCOV version 1.16