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.1 lcov report (development 30107-5d3c5ac62a) Lines: 1612 1788 90.2 %
Date: 2025-04-01 09:20:36 Functions: 97 107 90.7 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
FpM_echelon 3143017
FpM_hnfend 3143241
FpV_Fp_mul_part_ip 5308073
FpV_red_part_ipvec 35949849
Minus 2048507
RgC_elem 511
RgM_hnfall 42
RgM_reduce 84
RgXM_snf 49
ZC_elem 39740892
ZC_lincomb1z 21797454
ZC_lincomb1z_i 21806533
ZM_hnf 88897
ZM_hnf_knapsack 238
ZM_hnfall 28760
ZM_hnfall_i 725504
ZM_hnfcenter 25156
ZM_hnflll 230898
ZM_hnfmod 162462
ZM_hnfmodall 4872713
ZM_hnfmodall_i 4923329
ZM_hnfmodid 4300739
ZM_hnfmodprime 3143011
ZM_hnfperm 385
ZM_redpart 1387948
ZM_reduce 4137082
ZM_rowrankprofile 225392
ZM_snf 10864
ZM_snf_group 643644
ZM_snf_no_divide 1076940
ZM_snfall 63959
ZM_snfall_i 721996
ZM_snfclean 947657
ZMrow_divexact_inplace 862819
ZV_allequal 219931
ZV_extgcd 109242
ZV_gcdext_i 109256
ZV_hnfgcdext 21
ZV_snf_group 303924
ZV_snf_rank 91
ZV_snf_rank_u 49
ZV_snf_trunc 0
ZV_snfall 303924
ZV_snfclean 214285
ZpM_echelon 528085
addmulzii 517368704
addzi 239058346
affii2_or_copy_gc 47753746
affii_or_copy_gc 8448806
allhnfmod 407969
bezout_step 702698
col_dup 2608048
col_mul 2698303
count 8099746
count2 420121
do_zero 0
findi 105753035
findi_normalize 105748413
gbezout_step 882
gsmith 0
gsmithall 0
gsnf_no_divide 196
hnf 14
hnf_divscale 196558
hnf_i 61614
hnf_invimage 372330
hnf_invscale 237230
hnf_solve 321193
hnfadd 0
hnfadd_i 91188
hnfall 14
hnfallgen 21
hnfdivide 133
hnffinal 225390
hnflll 7
hnfmerge_get_1 743610
hnfmod 14
hnfmodid 407955
hnfperm 14
hnfspec 0
hnfspec_i 134203
hnfswap 8460936
is_RgX 2590
mathnf0 287
mathnfspec 0
matsnf0 469
must_swap 4606743
negcmpii 520316
normalize_as_RgX 364
optimal_D 4921387
p_mat 0
reduce1 950593
reduce2 52860074
remove_0cols 321735
reverse_rows 461784
smith 385
smithall 35
smithclean 693
snf_group 947658
snf_pile 984724
snf_pile1 48
snfrank 154
subzi 6442313
trivsmith 0
update 674589
zlm_echelon 4670700
zv_snf_rank 0

Generated by: LCOV version 1.16