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 30255-d53bcee72d) Lines: 1602 1778 90.1 %
Date: 2025-05-05 09:18:52 Functions: 96 106 90.6 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
FpM_echelon 3143094
FpM_hnfend 3143227
FpV_Fp_mul_part_ip 5308348
FpV_red_part_ipvec 35955231
Minus 2049658
RgC_elem 511
RgM_hnfall 42
RgM_reduce 84
RgXM_snf 49
ZC_elem 39731925
ZC_lincomb1z 21799923
ZC_lincomb1z_i 21809091
ZM_hnf 88830
ZM_hnf_knapsack 238
ZM_hnfall 28726
ZM_hnfall_i 725474
ZM_hnfcenter 25159
ZM_hnflll 231055
ZM_hnfmod 162480
ZM_hnfmodall 4873614
ZM_hnfmodall_i 4924248
ZM_hnfmodid 4301583
ZM_hnfmodprime 3143092
ZM_hnfperm 385
ZM_redpart 1388024
ZM_reduce 4128310
ZM_rowrankprofile 225549
ZM_snf 10864
ZM_snf_group 643664
ZM_snf_no_divide 1076963
ZM_snfall 63959
ZM_snfall_i 722020
ZM_snfclean 947665
ZMrow_divexact_inplace 862817
ZV_allequal 219929
ZV_extgcd 109242
ZV_gcdext_i 109256
ZV_hnfgcdext 21
ZV_snf_group 303953
ZV_snf_rank 91
ZV_snf_rank_u 49
ZV_snf_trunc 0
ZV_snfall 303952
ZV_snfclean 214280
ZpM_echelon 528097
addmulzii 517283341
addzi 239023883
affii2_or_copy_gc 47758419
allhnfmod 407961
bezout_step 702695
col_dup 2608053
col_mul 2698271
count 8100057
count2 420186
do_zero 0
findi 105725334
findi_normalize 105717634
gbezout_step 882
gsmith 0
gsmithall 0
gsnf_no_divide 196
hnf 14
hnf_divscale 196659
hnf_i 61582
hnf_invimage 372325
hnf_invscale 237232
hnf_solve 321184
hnfadd 0
hnfadd_i 91343
hnfall 14
hnfallgen 21
hnfdivide 133
hnffinal 225547
hnflll 7
hnfmerge_get_1 743662
hnfmod 14
hnfmodid 407947
hnfperm 14
hnfspec 0
hnfspec_i 134204
hnfswap 8464015
is_RgX 2590
mathnf0 287
mathnfspec 0
matsnf0 469
must_swap 4607578
negcmpii 520346
normalize_as_RgX 364
optimal_D 4922221
p_mat 0
reduce1 950593
reduce2 52849496
remove_0cols 321658
reverse_rows 462098
smith 385
smithall 35
smithclean 693
snf_group 947669
snf_pile 984761
snf_pile1 48
snfrank 154
subzi 6442710
trivsmith 0
update 674580
zlm_echelon 4670730
zv_snf_rank 0

Generated by: LCOV version 1.16