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 29884-9d10e5cf54) Lines: 1612 1788 90.2 %
Date: 2025-01-20 09:10:26 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 10850
ZM_hnfcenter 25214
ZM_hnfall 28763
hnf_i 61652
ZM_snfall 63987
ZM_hnf 88938
hnfadd_i 91132
ZV_extgcd 109221
ZV_gcdext_i 109235
hnfspec_i 134299
ZM_hnfmod 162379
hnf_divscale 196905
ZV_snfclean 214281
ZV_allequal 219995
ZM_rowrankprofile 225430
hnffinal 225431
ZM_hnflll 230937
hnf_invscale 237241
ZV_snfall 303901
ZV_snf_group 303903
hnf_solve 321099
remove_0cols 321754
hnf_invimage 372351
hnfmodid 408038
allhnfmod 408052
count2 420522
reverse_rows 461860
negcmpii 520237
ZpM_echelon 527987
ZM_snf_group 643730
update 674891
bezout_step 702994
ZM_snfall_i 722094
ZM_hnfall_i 725485
hnfmerge_get_1 742387
ZMrow_divexact_inplace 862990
ZM_snfclean 947727
snf_group 947733
reduce1 950524
snf_pile 984828
ZM_snf_no_divide 1077137
ZM_redpart 1388639
Minus 2051033
col_dup 2609441
col_mul 2699496
ZM_hnfmodprime 3142852
FpM_echelon 3142869
FpM_hnfend 3143077
ZM_reduce 4141939
ZM_hnfmodid 4296380
must_swap 4612963
zlm_echelon 4668486
ZM_hnfmodall 4868213
optimal_D 4916748
ZM_hnfmodall_i 4918796
FpV_Fp_mul_part_ip 5311269
subzi 6447301
count 8101067
affii_or_copy_gc 8458463
hnfswap 8470811
ZC_lincomb1z 21825209
ZC_lincomb1z_i 21832641
FpV_red_part_ipvec 35882176
ZC_elem 39686617
affii2_or_copy_gc 47776030
reduce2 52905587
findi_normalize 105841696
findi 105848805
addzi 239289934
addmulzii 517683711

Generated by: LCOV version 1.16