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.18.0 lcov report (development 29580-d8b649a849) Lines: 1612 1788 90.2 %
Date: 2024-10-04 09:07:15 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_hnfcenter 25112
ZM_hnfall 28641
hnf_i 61630
ZM_snfall 63931
ZM_hnf 88794
hnfadd_i 90554
ZV_extgcd 109144
ZV_gcdext_i 109158
hnfspec_i 134196
ZM_hnfmod 165169
hnf_divscale 200722
ZV_snfclean 214282
ZV_allequal 219865
hnffinal 224749
ZM_rowrankprofile 224750
ZM_hnflll 230242
hnf_invscale 236988
ZV_snf_group 303842
ZV_snfall 303842
hnf_solve 314909
remove_0cols 321547
hnf_invimage 366019
hnfmodid 400136
allhnfmod 400150
count2 418254
reverse_rows 460472
negcmpii 520197
ZpM_echelon 524972
ZM_snf_group 643289
update 674075
bezout_step 702173
ZM_snfall_i 721559
ZM_hnfall_i 721755
hnfmerge_get_1 741768
ZMrow_divexact_inplace 862190
ZM_snfclean 947212
snf_group 947219
reduce1 950454
snf_pile 984283
ZM_snf_no_divide 1076194
ZM_redpart 1387225
Minus 2019167
col_dup 2601376
col_mul 2696263
FpM_echelon 3142993
ZM_hnfmodprime 3143004
FpM_hnfend 3143206
ZM_reduce 4129811
ZM_hnfmodid 4325381
must_swap 4477948
zlm_echelon 4655341
ZM_hnfmodall 4891846
optimal_D 4939219
ZM_hnfmodall_i 4941272
FpV_Fp_mul_part_ip 5306037
subzi 6178627
count 7970550
affii_or_copy_gc 8269734
hnfswap 8281965
ZC_lincomb1z 21265945
ZC_lincomb1z_i 21274685
FpV_red_part_ipvec 35712215
ZC_elem 39412402
affii2_or_copy_gc 45214722
reduce2 50996775
findi_normalize 102027322
findi 102035580
addzi 225408239
addmulzii 494146402

Generated by: LCOV version 1.16