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 29465-f396510193) Lines: 1612 1788 90.2 %
Date: 2024-07-25 09:03:53 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_hnfall 23904
ZM_hnfcenter 25083
hnf_i 56885
ZM_snfall 63861
hnfadd_i 64843
ZM_hnf 79312
ZV_extgcd 109144
ZV_gcdext_i 109158
hnfspec_i 134123
ZM_hnfmod 165156
hnf_divscale 197704
ZM_rowrankprofile 198967
hnffinal 198967
ZM_hnflll 204462
ZV_snfclean 214180
ZV_allequal 219798
hnf_invscale 236897
ZV_snf_group 303720
ZV_snfall 303720
remove_0cols 311991
hnf_solve 314895
hnf_invimage 366239
hnfmodid 399931
allhnfmod 399945
count2 407217
reverse_rows 408908
negcmpii 520077
ZpM_echelon 525053
ZM_snf_group 643085
update 673441
bezout_step 701542
ZM_hnfall_i 716917
ZM_snfall_i 721291
hnfmerge_get_1 741517
ZMrow_divexact_inplace 861805
ZM_snfclean 946868
snf_group 946874
reduce1 950454
snf_pile 983876
ZM_snf_no_divide 1075581
ZM_redpart 1386183
Minus 1994153
col_dup 2654766
col_mul 2693688
ZM_hnfmodprime 3170048
FpM_echelon 3170059
FpM_hnfend 3170207
ZM_reduce 4087905
ZM_hnfmodid 4141232
zlm_echelon 4650128
must_swap 4664716
ZM_hnfmodall 4707535
optimal_D 4754660
ZM_hnfmodall_i 4756676
FpV_Fp_mul_part_ip 5317074
subzi 6442618
count 7986429
affii_or_copy_gc 8309150
hnfswap 8318662
ZC_lincomb1z 21081334
ZC_lincomb1z_i 21086946
FpV_red_part_ipvec 34785115
ZC_elem 38694288
affii2_or_copy_gc 46557046
reduce2 52705951
findi_normalize 105424415
findi 105435429
addzi 228457281
addmulzii 507024171

Generated by: LCOV version 1.16