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
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 25213
ZM_hnfall 28742
hnf_i 61660
ZM_snfall 63986
ZM_hnf 88924
hnfadd_i 91115
ZV_extgcd 109221
ZV_gcdext_i 109235
hnfspec_i 134298
ZM_hnfmod 162378
hnf_divscale 196916
ZV_snfclean 214274
ZV_allequal 219992
ZM_rowrankprofile 225412
hnffinal 225414
ZM_hnflll 230923
hnf_invscale 237237
ZV_snf_group 303907
ZV_snfall 303907
hnf_solve 321091
remove_0cols 321738
hnf_invimage 372342
hnfmodid 408043
allhnfmod 408057
count2 420342
reverse_rows 461834
negcmpii 520243
ZpM_echelon 528338
ZM_snf_group 643730
update 674816
bezout_step 702932
ZM_snfall_i 722099
ZM_hnfall_i 725468
hnfmerge_get_1 742435
ZMrow_divexact_inplace 862976
ZM_snfclean 947713
snf_group 947719
reduce1 950524
snf_pile 984819
ZM_snf_no_divide 1077094
ZM_redpart 1388543
Minus 2050891
col_dup 2609370
col_mul 2699158
ZM_hnfmodprime 3143007
FpM_echelon 3143013
FpM_hnfend 3143162
ZM_reduce 4140751
ZM_hnfmodid 4296482
must_swap 4613977
zlm_echelon 4670404
ZM_hnfmodall 4868389
optimal_D 4916800
ZM_hnfmodall_i 4918932
FpV_Fp_mul_part_ip 5311763
subzi 6448754
count 8102235
affii_or_copy_gc 8457834
hnfswap 8470657
ZC_lincomb1z 21819170
ZC_lincomb1z_i 21829434
FpV_red_part_ipvec 35882283
ZC_elem 39685077
affii2_or_copy_gc 47775639
reduce2 52902577
findi_normalize 105834750
findi 105841394
addzi 239229358
addmulzii 517527714

Generated by: LCOV version 1.16