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.18.0 lcov report (development 29685-209b4888d8) Lines: 1612 1788 90.2 %
Date: 2024-11-07 09:09:32 Functions: 97 107 90.7 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
FpM_echelon 3144282
FpM_hnfend 3144483
FpV_Fp_mul_part_ip 5308023
FpV_red_part_ipvec 36006055
Minus 2051248
RgC_elem 511
RgM_hnfall 42
RgM_reduce 84
RgXM_snf 49
ZC_elem 39763470
ZC_lincomb1z 21823261
ZC_lincomb1z_i 21831786
ZM_hnf 88751
ZM_hnf_knapsack 238
ZM_hnfall 28618
ZM_hnfall_i 725272
ZM_hnfcenter 25157
ZM_hnflll 230973
ZM_hnfmod 165384
ZM_hnfmodall 4911063
ZM_hnfmodall_i 4960633
ZM_hnfmodid 4336384
ZM_hnfmodprime 3144282
ZM_hnfperm 385
ZM_redpart 1388132
ZM_reduce 4135159
ZM_rowrankprofile 225478
ZM_snf 10829
ZM_snf_group 643552
ZM_snf_no_divide 1076843
ZM_snfall 63958
ZM_snfall_i 721869
ZM_snfclean 947515
ZMrow_divexact_inplace 862693
ZV_allequal 219911
ZV_extgcd 109172
ZV_gcdext_i 109186
ZV_hnfgcdext 21
ZV_snf_group 303859
ZV_snf_rank 91
ZV_snf_rank_u 49
ZV_snf_trunc 0
ZV_snfall 303859
ZV_snfclean 214285
ZpM_echelon 524898
addmulzii 517701017
addzi 239285021
affii2_or_copy_gc 47781499
affii_or_copy_gc 8459305
allhnfmod 408012
bezout_step 702579
col_dup 2609137
col_mul 2697822
count 8101671
count2 420335
do_zero 0
findi 105843519
findi_normalize 105835830
gbezout_step 882
gsmith 0
gsmithall 0
gsnf_no_divide 196
hnf 14
hnf_divscale 201367
hnf_i 61610
hnf_invimage 366032
hnf_invscale 237141
hnf_solve 314912
hnfadd 0
hnfadd_i 91212
hnfall 14
hnfallgen 21
hnfdivide 133
hnffinal 225479
hnflll 7
hnfmerge_get_1 743243
hnfmod 14
hnfmodid 407998
hnfperm 14
hnfspec 0
hnfspec_i 134267
hnfswap 8471522
is_RgX 2590
mathnf0 287
mathnfspec 0
matsnf0 469
must_swap 4614863
negcmpii 520222
normalize_as_RgX 364
optimal_D 4958578
p_mat 0
reduce1 950510
reduce2 52902250
remove_0cols 321526
reverse_rows 461924
smith 385
smithall 35
smithclean 693
snf_group 947520
snf_pile 984623
snf_pile1 48
snfrank 154
subzi 6447441
trivsmith 0
update 674478
zlm_echelon 4656828
zv_snf_rank 0

Generated by: LCOV version 1.16