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 30218-f32872418f) Lines: 1609 1785 90.1 %
Date: 2025-04-27 09:18: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 3143040
FpM_hnfend 3143291
FpV_Fp_mul_part_ip 5308372
FpV_red_part_ipvec 35960095
Minus 2048857
RgC_elem 511
RgM_hnfall 42
RgM_reduce 84
RgXM_snf 49
ZC_elem 39748891
ZC_lincomb1z 21799016
ZC_lincomb1z_i 21809335
ZM_hnf 88898
ZM_hnf_knapsack 238
ZM_hnfall 28775
ZM_hnfall_i 725517
ZM_hnfcenter 25158
ZM_hnflll 230939
ZM_hnfmod 162484
ZM_hnfmodall 4873814
ZM_hnfmodall_i 4924410
ZM_hnfmodid 4301767
ZM_hnfmodprime 3142993
ZM_hnfperm 385
ZM_redpart 1388150
ZM_reduce 4137182
ZM_rowrankprofile 225427
ZM_snf 10864
ZM_snf_group 643661
ZM_snf_no_divide 1076990
ZM_snfall 63959
ZM_snfall_i 722022
ZM_snfclean 947679
ZMrow_divexact_inplace 862814
ZV_allequal 219928
ZV_extgcd 109242
ZV_gcdext_i 109256
ZV_hnfgcdext 21
ZV_snf_group 303949
ZV_snf_rank 91
ZV_snf_rank_u 49
ZV_snf_trunc 0
ZV_snfall 303949
ZV_snfclean 214289
ZpM_echelon 528089
addmulzii 517433836
addzi 239128316
affii2_or_copy_gc 47761061
affii_or_copy_gc 8451412
allhnfmod 407957
bezout_step 702701
col_dup 2607974
col_mul 2698387
count 8098674
count2 419978
do_zero 0
findi 105738574
findi_normalize 105730146
gbezout_step 882
gsmith 0
gsmithall 0
gsnf_no_divide 196
hnf 14
hnf_divscale 196655
hnf_i 61600
hnf_invimage 372318
hnf_invscale 237231
hnf_solve 321188
hnfadd 0
hnfadd_i 91222
hnfall 14
hnfallgen 21
hnfdivide 133
hnffinal 225430
hnflll 7
hnfmerge_get_1 743651
hnfmod 14
hnfmodid 407943
hnfperm 14
hnfspec 0
hnfspec_i 134205
hnfswap 8462677
is_RgX 2590
mathnf0 287
mathnfspec 0
matsnf0 469
must_swap 4607412
negcmpii 520343
normalize_as_RgX 364
optimal_D 4922327
p_mat 0
reduce1 950593
reduce2 52856864
remove_0cols 321735
reverse_rows 461862
smith 385
smithall 35
smithclean 693
snf_group 947683
snf_pile 984754
snf_pile1 48
snfrank 154
subzi 6442310
trivsmith 0
update 674616
zlm_echelon 4670731
zv_snf_rank 0

Generated by: LCOV version 1.16