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: 1559 1728 90.2 %
Date: 2024-04-18 08:07:12 Functions: 90 100 90.0 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
FpM_echelon 3167944
FpM_hnfend 3168166
FpV_Fp_mul_part_ip 5297566
FpV_red_part_ipvec 35093111
Minus 2025622
RgC_elem 511
RgM_hnfall 42
RgM_reduce 84
RgXM_snf 49
ZC_elem 39079674
ZM_hnf 77393
ZM_hnf_knapsack 238
ZM_hnfall 24423
ZM_hnfall_i 717642
ZM_hnfcenter 25086
ZM_hnflll 213457
ZM_hnfmod 155466
ZM_hnfmodall 4724133
ZM_hnfmodall_i 4773196
ZM_hnfmodid 4170137
ZM_hnfmodprime 3167950
ZM_hnfperm 385
ZM_redpart 1378109
ZM_reduce 4143979
ZM_rowrankprofile 210266
ZM_snf 1638
ZM_snf_group 642805
ZM_snf_no_divide 1063395
ZM_snfall 63805
ZM_snfall_i 711752
ZM_snfclean 944248
ZMrow_divexact_inplace 861300
ZV_allequal 219761
ZV_extgcd 109032
ZV_gcdext_i 109046
ZV_hnfgcdext 21
ZV_snf_group 301367
ZV_snf_rank 91
ZV_snf_rank_u 49
ZV_snf_trunc 0
ZV_snfall 301367
ZV_snfclean 214170
ZpM_echelon 524250
allhnfmod 397348
bezout_step 695640
col_dup 2652700
col_mul 2693558
count 7980240
count2 410092
do_zero 0
findi 105975594
findi_normalize 105943807
gbezout_step 882
gsmith 0
gsmithall 0
gsnf_no_divide 196
hnf 14
hnf_divscale 195924
hnf_i 54447
hnf_invimage 365789
hnf_invscale 236790
hnf_solve 314473
hnfadd 0
hnfadd_i 76305
hnfall 14
hnfallgen 21
hnfdivide 133
hnffinal 210265
hnflll 7
hnfmerge_get_1 741088
hnfmod 14
hnfmodid 397334
hnfperm 14
hnfspec 0
hnfspec_i 133960
hnfswap 8371945
is_RgX 2590
mathnf0 287
mathnfspec 0
matsnf0 469
must_swap 4733256
negcmpii 517588
normalize_as_RgX 364
optimal_D 4771002
p_mat 0
reduce1 949238
reduce2 52970748
remove_0cols 309855
reverse_rows 426896
smith 385
smithall 35
smithclean 693
snf_group 944251
snf_pile 972091
snf_pile1 63
snfrank 154
trivsmith 0
update 673407
zlm_echelon 4650250
zv_snf_rank 0

Generated by: LCOV version 1.14