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.1 lcov report (development 30256-57c6c2b57f) Lines: 1602 1778 90.1 %
Date: 2025-05-09 09:19:30 Functions: 96 106 90.6 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
FpM_echelon 3143072
FpM_hnfend 3143188
FpV_Fp_mul_part_ip 5308389
FpV_red_part_ipvec 35960065
Minus 2049719
RgC_elem 511
RgM_hnfall 42
RgM_reduce 84
RgXM_snf 49
ZC_elem 39745381
ZC_lincomb1z 21804264
ZC_lincomb1z_i 21814246
ZM_hnf 88911
ZM_hnf_knapsack 238
ZM_hnfall 28771
ZM_hnfall_i 725516
ZM_hnfcenter 25156
ZM_hnflll 231085
ZM_hnfmod 162483
ZM_hnfmodall 4873828
ZM_hnfmodall_i 4924444
ZM_hnfmodid 4301772
ZM_hnfmodprime 3143060
ZM_hnfperm 385
ZM_redpart 1387896
ZM_reduce 4135400
ZM_rowrankprofile 225576
ZM_snf 10864
ZM_snf_group 643657
ZM_snf_no_divide 1076888
ZM_snfall 63958
ZM_snfall_i 722005
ZM_snfclean 947666
ZMrow_divexact_inplace 862823
ZV_allequal 219932
ZV_extgcd 109242
ZV_gcdext_i 109256
ZV_hnfgcdext 21
ZV_snf_group 303954
ZV_snf_rank 91
ZV_snf_rank_u 49
ZV_snf_trunc 0
ZV_snfall 303953
ZV_snfclean 214283
ZpM_echelon 528079
addmulzii 517439280
addzi 239135164
affii2_or_copy_gc 47768312
allhnfmod 407963
bezout_step 702638
col_dup 2608015
col_mul 2698185
count 8099852
count2 420095
do_zero 0
findi 105753700
findi_normalize 105747172
gbezout_step 882
gsmith 0
gsmithall 0
gsnf_no_divide 196
hnf 14
hnf_divscale 196650
hnf_i 61617
hnf_invimage 372329
hnf_invscale 237227
hnf_solve 321196
hnfadd 0
hnfadd_i 91370
hnfall 14
hnfallgen 21
hnfdivide 133
hnffinal 225576
hnflll 7
hnfmerge_get_1 743656
hnfmod 14
hnfmodid 407950
hnfperm 14
hnfspec 0
hnfspec_i 134203
hnfswap 8465222
is_RgX 2590
mathnf0 287
mathnfspec 0
matsnf0 469
must_swap 4607652
negcmpii 520348
normalize_as_RgX 364
optimal_D 4922455
p_mat 0
reduce1 950593
reduce2 52865074
remove_0cols 321744
reverse_rows 462156
smith 385
smithall 35
smithclean 693
snf_group 947668
snf_pile 984751
snf_pile1 48
snfrank 154
subzi 6443686
trivsmith 0
update 674559
zlm_echelon 4670638
zv_snf_rank 0

Generated by: LCOV version 1.16