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 29814-7ab976b450) Lines: 1612 1788 90.2 %
Date: 2024-12-24 09:08:56 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 10843
ZM_hnfcenter 25152
ZM_hnfall 28753
hnf_i 61647
ZM_snfall 63972
ZM_hnf 88923
hnfadd_i 91102
ZV_extgcd 109207
ZV_gcdext_i 109221
hnfspec_i 134277
ZM_hnfmod 165571
hnf_divscale 201599
ZV_snfclean 214275
ZV_allequal 219981
ZM_rowrankprofile 225376
hnffinal 225378
ZM_hnflll 230887
hnf_invscale 237220
ZV_snf_group 303889
ZV_snfall 303889
hnf_solve 314909
remove_0cols 321723
hnf_invimage 366164
hnfmodid 408008
allhnfmod 408022
count2 420353
reverse_rows 461768
negcmpii 520223
ZpM_echelon 524905
ZM_snf_group 643668
update 674829
bezout_step 702958
ZM_snfall_i 722009
ZM_hnfall_i 725445
hnfmerge_get_1 743927
ZMrow_divexact_inplace 862907
ZM_snfclean 947619
snf_group 947624
reduce1 950510
snf_pile 984770
ZM_snf_no_divide 1077036
ZM_redpart 1388633
Minus 2050296
col_dup 2609135
col_mul 2699254
FpM_echelon 3144673
ZM_hnfmodprime 3144683
FpM_hnfend 3144805
ZM_reduce 4142196
ZM_hnfmodid 4339581
must_swap 4612806
zlm_echelon 4657052
ZM_hnfmodall 4914531
optimal_D 4962174
ZM_hnfmodall_i 4964193
FpV_Fp_mul_part_ip 5310778
subzi 6447882
count 8101789
affii_or_copy_gc 8455884
hnfswap 8469415
ZC_lincomb1z 21815349
ZC_lincomb1z_i 21824166
FpV_red_part_ipvec 36030974
ZC_elem 39761947
affii2_or_copy_gc 47772841
reduce2 52893336
findi_normalize 105818491
findi 105826133
addzi 239295835
addmulzii 517814193

Generated by: LCOV version 1.16