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-04-19 08:07:09 Functions: 90 100 90.0 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
FpM_echelon 3167915
FpM_hnfend 3168211
FpV_Fp_mul_part_ip 5297550
FpV_red_part_ipvec 35106766
Minus 2025922
RgC_elem 511
RgM_hnfall 42
RgM_reduce 84
RgXM_snf 49
ZC_elem 39079551
ZM_hnf 77344
ZM_hnf_knapsack 238
ZM_hnfall 24391
ZM_hnfall_i 717604
ZM_hnfcenter 25083
ZM_hnflll 213848
ZM_hnfmod 155469
ZM_hnfmodall 4725453
ZM_hnfmodall_i 4774503
ZM_hnfmodid 4171479
ZM_hnfmodprime 3167928
ZM_hnfperm 385
ZM_redpart 1378377
ZM_reduce 4133398
ZM_rowrankprofile 210654
ZM_snf 1638
ZM_snf_group 642816
ZM_snf_no_divide 1063451
ZM_snfall 63804
ZM_snfall_i 711759
ZM_snfclean 944264
ZMrow_divexact_inplace 861322
ZV_allequal 219760
ZV_extgcd 109032
ZV_gcdext_i 109046
ZV_hnfgcdext 21
ZV_snf_group 301368
ZV_snf_rank 91
ZV_snf_rank_u 49
ZV_snf_trunc 0
ZV_snfall 301367
ZV_snfclean 214155
ZpM_echelon 524255
allhnfmod 397349
bezout_step 695814
col_dup 2652706
col_mul 2694271
count 7978821
count2 409997
do_zero 0
findi 105990884
findi_normalize 105963819
gbezout_step 882
gsmith 0
gsmithall 0
gsnf_no_divide 196
hnf 14
hnf_divscale 195924
hnf_i 54430
hnf_invimage 365796
hnf_invscale 236786
hnf_solve 314422
hnfadd 0
hnfadd_i 76693
hnfall 14
hnfallgen 21
hnfdivide 133
hnffinal 210656
hnflll 7
hnfmerge_get_1 741106
hnfmod 14
hnfmodid 397335
hnfperm 14
hnfspec 0
hnfspec_i 133963
hnfswap 8374387
is_RgX 2590
mathnf0 287
mathnfspec 0
matsnf0 469
must_swap 4732850
negcmpii 517573
normalize_as_RgX 364
optimal_D 4772414
p_mat 0
reduce1 949238
reduce2 52981910
remove_0cols 309820
reverse_rows 427675
smith 385
smithall 35
smithclean 693
snf_group 944269
snf_pile 972073
snf_pile1 63
snfrank 154
trivsmith 0
update 673576
zlm_echelon 4650233
zv_snf_rank 0

Generated by: LCOV version 1.14