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.16.2 lcov report (development 29115-f22e516b23) Lines: 1557 1728 90.1 %
Date: 2024-05-13 08:08:23 Functions: 90 100 90.0 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
FpM_echelon 3167963
FpM_hnfend 3168183
FpV_Fp_mul_part_ip 5297614
FpV_red_part_ipvec 35109669
Minus 2025074
RgC_elem 511
RgM_hnfall 42
RgM_reduce 84
RgXM_snf 49
ZC_elem 39079139
ZM_hnf 77333
ZM_hnf_knapsack 238
ZM_hnfall 24389
ZM_hnfall_i 717617
ZM_hnfcenter 25082
ZM_hnflll 213829
ZM_hnfmod 155468
ZM_hnfmodall 4725570
ZM_hnfmodall_i 4774634
ZM_hnfmodid 4171586
ZM_hnfmodprime 3167964
ZM_hnfperm 385
ZM_redpart 1378266
ZM_reduce 4131511
ZM_rowrankprofile 210638
ZM_snf 1638
ZM_snf_group 642830
ZM_snf_no_divide 1063416
ZM_snfall 63805
ZM_snfall_i 711773
ZM_snfclean 944255
ZMrow_divexact_inplace 861313
ZV_allequal 219750
ZV_extgcd 109032
ZV_gcdext_i 109046
ZV_hnfgcdext 21
ZV_snf_group 301369
ZV_snf_rank 91
ZV_snf_rank_u 49
ZV_snf_trunc 0
ZV_snfall 301369
ZV_snfclean 214163
ZpM_echelon 524252
allhnfmod 397341
bezout_step 695759
col_dup 2652758
col_mul 2694059
count 7979727
count2 410057
do_zero 0
findi 105971009
findi_normalize 105938317
gbezout_step 882
gsmith 0
gsmithall 0
gsnf_no_divide 196
hnf 14
hnf_divscale 195923
hnf_i 54421
hnf_invimage 365797
hnf_invscale 236792
hnf_solve 314482
hnfadd 0
hnfadd_i 76674
hnfall 14
hnfallgen 21
hnfdivide 133
hnffinal 210637
hnflll 7
hnfmerge_get_1 741105
hnfmod 14
hnfmodid 397327
hnfperm 14
hnfspec 0
hnfspec_i 133964
hnfswap 8373004
is_RgX 2590
mathnf0 287
mathnfspec 0
matsnf0 469
must_swap 4731912
negcmpii 517582
normalize_as_RgX 364
optimal_D 4772573
p_mat 0
reduce1 949238
reduce2 52968500
remove_0cols 309802
reverse_rows 427640
smith 385
smithall 35
smithclean 693
snf_group 944262
snf_pile 972077
snf_pile1 63
snfrank 154
trivsmith 0
update 673536
zlm_echelon 4650286
zv_snf_rank 0

Generated by: LCOV version 1.14