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 30271-60da3cd182) Lines: 1602 1778 90.1 %
Date: 2025-05-11 09:20:26 Functions: 96 106 90.6 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
FpM_echelon 3143153
FpM_hnfend 3143317
FpV_Fp_mul_part_ip 5309015
FpV_red_part_ipvec 35971335
Minus 2049911
RgC_elem 511
RgM_hnfall 42
RgM_reduce 84
RgXM_snf 49
ZC_elem 39746823
ZC_lincomb1z 21815933
ZC_lincomb1z_i 21821194
ZM_hnf 88894
ZM_hnf_knapsack 238
ZM_hnfall 28701
ZM_hnfall_i 726371
ZM_hnfcenter 25158
ZM_hnflll 231043
ZM_hnfmod 162497
ZM_hnfmodall 4875371
ZM_hnfmodall_i 4925961
ZM_hnfmodid 4302009
ZM_hnfmodprime 3143139
ZM_hnfperm 385
ZM_redpart 1388833
ZM_reduce 4135121
ZM_rowrankprofile 225534
ZM_snf 10864
ZM_snf_group 644502
ZM_snf_no_divide 1077629
ZM_snfall 63959
ZM_snfall_i 722872
ZM_snfclean 948749
ZMrow_divexact_inplace 864038
ZV_allequal 219988
ZV_extgcd 110572
ZV_gcdext_i 110586
ZV_hnfgcdext 21
ZV_snf_group 304179
ZV_snf_rank 91
ZV_snf_rank_u 49
ZV_snf_trunc 0
ZV_snfall 304179
ZV_snfclean 214526
ZpM_echelon 528070
addmulzii 517675339
addzi 239313907
affii2_or_copy_gc 47772305
allhnfmod 409290
bezout_step 703216
col_dup 2608065
col_mul 2700482
count 8099025
count2 420168
do_zero 0
findi 105783578
findi_normalize 105780886
gbezout_step 882
gsmith 0
gsmithall 0
gsnf_no_divide 196
hnf 14
hnf_divscale 196660
hnf_i 61670
hnf_invimage 379893
hnf_invscale 237686
hnf_solve 328818
hnfadd 0
hnfadd_i 91331
hnfall 14
hnfallgen 21
hnfdivide 133
hnffinal 225535
hnflll 7
hnfmerge_get_1 743884
hnfmod 14
hnfmodid 409276
hnfperm 14
hnfspec 0
hnfspec_i 134205
hnfswap 8472818
is_RgX 2590
mathnf0 287
mathnfspec 0
matsnf0 469
must_swap 4612945
negcmpii 520880
normalize_as_RgX 364
optimal_D 4924155
p_mat 0
reduce1 969787
reduce2 52876525
remove_0cols 322524
reverse_rows 462071
smith 385
smithall 35
smithclean 693
snf_group 948752
snf_pile 985832
snf_pile1 48
snfrank 154
subzi 6442066
trivsmith 0
update 675135
zlm_echelon 4670829
zv_snf_rank 0

Generated by: LCOV version 1.16