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 29815-a300ec5c34) Lines: 1612 1788 90.2 %
Date: 2024-12-25 09:08:54 Functions: 97 107 90.7 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
FpM_echelon 3144642
FpM_hnfend 3144851
FpV_Fp_mul_part_ip 5310849
FpV_red_part_ipvec 36030895
Minus 2050240
RgC_elem 511
RgM_hnfall 42
RgM_reduce 84
RgXM_snf 49
ZC_elem 39751435
ZC_lincomb1z 21806567
ZC_lincomb1z_i 21815433
ZM_hnf 88844
ZM_hnf_knapsack 238
ZM_hnfall 28713
ZM_hnfall_i 725405
ZM_hnfcenter 25149
ZM_hnflll 230831
ZM_hnfmod 165571
ZM_hnfmodall 4914427
ZM_hnfmodall_i 4964074
ZM_hnfmodid 4339501
ZM_hnfmodprime 3144664
ZM_hnfperm 385
ZM_redpart 1388633
ZM_reduce 4134494
ZM_rowrankprofile 225324
ZM_snf 10843
ZM_snf_group 643677
ZM_snf_no_divide 1077060
ZM_snfall 63973
ZM_snfall_i 722024
ZM_snfclean 947654
ZMrow_divexact_inplace 862916
ZV_allequal 219981
ZV_extgcd 109207
ZV_gcdext_i 109221
ZV_hnfgcdext 21
ZV_snf_group 303889
ZV_snf_rank 91
ZV_snf_rank_u 49
ZV_snf_trunc 0
ZV_snfall 303889
ZV_snfclean 214279
ZpM_echelon 524912
addmulzii 517500303
addzi 239073788
affii2_or_copy_gc 47753371
affii_or_copy_gc 8451013
allhnfmod 408022
bezout_step 702956
col_dup 2609294
col_mul 2699270
count 8100531
count2 420440
do_zero 0
findi 105790212
findi_normalize 105780445
gbezout_step 882
gsmith 0
gsmithall 0
gsnf_no_divide 196
hnf 14
hnf_divscale 201591
hnf_i 61609
hnf_invimage 366164
hnf_invscale 237215
hnf_solve 314902
hnfadd 0
hnfadd_i 91039
hnfall 14
hnfallgen 21
hnfdivide 133
hnffinal 225323
hnflll 7
hnfmerge_get_1 743921
hnfmod 14
hnfmodid 408008
hnfperm 14
hnfspec 0
hnfspec_i 134285
hnfswap 8466146
is_RgX 2590
mathnf0 287
mathnfspec 0
matsnf0 469
must_swap 4610488
negcmpii 520224
normalize_as_RgX 364
optimal_D 4962096
p_mat 0
reduce1 950510
reduce2 52873136
remove_0cols 321644
reverse_rows 461642
smith 385
smithall 35
smithclean 693
snf_group 947659
snf_pile 984769
snf_pile1 48
snfrank 154
subzi 6446231
trivsmith 0
update 674838
zlm_echelon 4657055
zv_snf_rank 0

Generated by: LCOV version 1.16