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 29466-df46cf9131) Lines: 1614 1788 90.3 %
Date: 2024-07-27 09:04:25 Functions: 97 107 90.7 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
FpM_echelon 3170053
FpM_hnfend 3170223
FpV_Fp_mul_part_ip 5317190
FpV_red_part_ipvec 34783537
Minus 1994955
RgC_elem 511
RgM_hnfall 42
RgM_reduce 84
RgXM_snf 49
ZC_elem 38689268
ZC_lincomb1z 21084957
ZC_lincomb1z_i 21089778
ZM_hnf 79313
ZM_hnf_knapsack 238
ZM_hnfall 23904
ZM_hnfall_i 716909
ZM_hnfcenter 25089
ZM_hnflll 204573
ZM_hnfmod 165155
ZM_hnfmodall 4707458
ZM_hnfmodall_i 4756601
ZM_hnfmodid 4141200
ZM_hnfmodprime 3170053
ZM_hnfperm 385
ZM_redpart 1386016
ZM_reduce 4085850
ZM_rowrankprofile 199080
ZM_snf 10808
ZM_snf_group 643076
ZM_snf_no_divide 1075518
ZM_snfall 63861
ZM_snfall_i 721280
ZM_snfclean 946862
ZMrow_divexact_inplace 861788
ZV_allequal 219798
ZV_extgcd 109144
ZV_gcdext_i 109158
ZV_hnfgcdext 21
ZV_snf_group 303720
ZV_snf_rank 91
ZV_snf_rank_u 49
ZV_snf_trunc 0
ZV_snfall 303720
ZV_snfclean 214183
ZpM_echelon 525048
addmulzii 506776525
addzi 228487449
affii2_or_copy_gc 46559356
affii_or_copy_gc 8311876
allhnfmod 399945
bezout_step 701493
col_dup 2654753
col_mul 2693486
count 7987990
count2 407377
do_zero 0
findi 105448857
findi_normalize 105443968
gbezout_step 882
gsmith 0
gsmithall 0
gsnf_no_divide 196
hnf 14
hnf_divscale 197704
hnf_i 56886
hnf_invimage 366229
hnf_invscale 236892
hnf_solve 314884
hnfadd 0
hnfadd_i 64955
hnfall 14
hnfallgen 21
hnfdivide 133
hnffinal 199080
hnflll 7
hnfmerge_get_1 741511
hnfmod 14
hnfmodid 399931
hnfperm 14
hnfspec 0
hnfspec_i 134124
hnfswap 8321106
is_RgX 2590
mathnf0 287
mathnfspec 0
matsnf0 469
must_swap 4665852
negcmpii 520084
normalize_as_RgX 364
optimal_D 4754600
p_mat 0
reduce1 950454
reduce2 52711082
remove_0cols 311983
reverse_rows 409135
smith 385
smithall 35
smithclean 693
snf_group 946864
snf_pile 983926
snf_pile1 48
snfrank 154
subzi 6443902
trivsmith 0
update 673411
zlm_echelon 4650171
zv_snf_rank 0

Generated by: LCOV version 1.16