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 29950-285c5b69ed) Lines: 1612 1788 90.2 %
Date: 2025-02-05 09:09:51 Functions: 97 107 90.7 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
FpM_echelon 3143013
FpM_hnfend 3143162
FpV_Fp_mul_part_ip 5311763
FpV_red_part_ipvec 35882283
Minus 2050891
RgC_elem 511
RgM_hnfall 42
RgM_reduce 84
RgXM_snf 49
ZC_elem 39685077
ZC_lincomb1z 21819170
ZC_lincomb1z_i 21829434
ZM_hnf 88924
ZM_hnf_knapsack 238
ZM_hnfall 28742
ZM_hnfall_i 725468
ZM_hnfcenter 25213
ZM_hnflll 230923
ZM_hnfmod 162378
ZM_hnfmodall 4868389
ZM_hnfmodall_i 4918932
ZM_hnfmodid 4296482
ZM_hnfmodprime 3143007
ZM_hnfperm 385
ZM_redpart 1388543
ZM_reduce 4140751
ZM_rowrankprofile 225412
ZM_snf 10850
ZM_snf_group 643730
ZM_snf_no_divide 1077094
ZM_snfall 63986
ZM_snfall_i 722099
ZM_snfclean 947713
ZMrow_divexact_inplace 862976
ZV_allequal 219992
ZV_extgcd 109221
ZV_gcdext_i 109235
ZV_hnfgcdext 21
ZV_snf_group 303907
ZV_snf_rank 91
ZV_snf_rank_u 49
ZV_snf_trunc 0
ZV_snfall 303907
ZV_snfclean 214274
ZpM_echelon 528338
addmulzii 517527714
addzi 239229358
affii2_or_copy_gc 47775639
affii_or_copy_gc 8457834
allhnfmod 408057
bezout_step 702932
col_dup 2609370
col_mul 2699158
count 8102235
count2 420342
do_zero 0
findi 105841394
findi_normalize 105834750
gbezout_step 882
gsmith 0
gsmithall 0
gsnf_no_divide 196
hnf 14
hnf_divscale 196916
hnf_i 61660
hnf_invimage 372342
hnf_invscale 237237
hnf_solve 321091
hnfadd 0
hnfadd_i 91115
hnfall 14
hnfallgen 21
hnfdivide 133
hnffinal 225414
hnflll 7
hnfmerge_get_1 742435
hnfmod 14
hnfmodid 408043
hnfperm 14
hnfspec 0
hnfspec_i 134298
hnfswap 8470657
is_RgX 2590
mathnf0 287
mathnfspec 0
matsnf0 469
must_swap 4613977
negcmpii 520243
normalize_as_RgX 364
optimal_D 4916800
p_mat 0
reduce1 950524
reduce2 52902577
remove_0cols 321738
reverse_rows 461834
smith 385
smithall 35
smithclean 693
snf_group 947719
snf_pile 984819
snf_pile1 48
snfrank 154
subzi 6448754
trivsmith 0
update 674816
zlm_echelon 4670404
zv_snf_rank 0

Generated by: LCOV version 1.16