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.17.0 lcov report (development 29536-db03280b45) Lines: 1614 1788 90.3 %
Date: 2024-09-17 09:03:02 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 10808
ZM_hnfcenter 25064
ZM_hnfall 28515
hnf_i 61584
ZM_snfall 63889
ZM_hnf 88622
hnfadd_i 90380
ZV_extgcd 109144
ZV_gcdext_i 109158
hnfspec_i 134152
ZM_hnfmod 165128
hnf_divscale 200658
ZV_snfclean 214185
ZV_allequal 219821
ZM_rowrankprofile 224533
hnffinal 224533
ZM_hnflll 230027
hnf_invscale 236928
ZV_snf_group 303716
ZV_snfall 303716
hnf_solve 314891
remove_0cols 321290
hnf_invimage 366001
hnfmodid 400025
allhnfmod 400039
count2 417942
reverse_rows 460034
negcmpii 520074
ZpM_echelon 524625
ZM_snf_group 643092
update 673741
bezout_step 701840
ZM_snfall_i 721321
ZM_hnfall_i 721528
hnfmerge_get_1 741508
ZMrow_divexact_inplace 861877
ZM_snfclean 946924
snf_group 946932
reduce1 950454
snf_pile 983981
ZM_snf_no_divide 1075747
ZM_redpart 1386653
Minus 2018572
col_dup 2600569
col_mul 2694923
FpM_echelon 3142329
ZM_hnfmodprime 3142334
FpM_hnfend 3142476
ZM_reduce 4119982
ZM_hnfmodid 4323726
must_swap 4475886
zlm_echelon 4653405
ZM_hnfmodall 4889584
optimal_D 4937218
ZM_hnfmodall_i 4939254
FpV_Fp_mul_part_ip 5303233
subzi 6174277
count 7969023
affii_or_copy_gc 8265549
hnfswap 8277932
ZC_lincomb1z 21259573
ZC_lincomb1z_i 21268427
FpV_red_part_ipvec 35685689
ZC_elem 39377535
affii2_or_copy_gc 45207923
reduce2 50972473
findi_normalize 101968553
findi 101974412
addzi 225358554
addmulzii 494056298

Generated by: LCOV version 1.16