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 29115-f22e516b23) Lines: 1557 1728 90.1 %
Date: 2024-05-08 08:08:05 Functions: 90 100 90.0 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
FpM_echelon 3167935
FpM_hnfend 3168192
FpV_Fp_mul_part_ip 5297585
FpV_red_part_ipvec 35101099
Minus 2025561
RgC_elem 511
RgM_hnfall 42
RgM_reduce 84
RgXM_snf 49
ZC_elem 39072730
ZM_hnf 77328
ZM_hnf_knapsack 238
ZM_hnfall 24385
ZM_hnfall_i 717608
ZM_hnfcenter 25082
ZM_hnflll 213737
ZM_hnfmod 155470
ZM_hnfmodall 4724994
ZM_hnfmodall_i 4774066
ZM_hnfmodid 4171028
ZM_hnfmodprime 3167938
ZM_hnfperm 385
ZM_redpart 1377994
ZM_reduce 4131948
ZM_rowrankprofile 210546
ZM_snf 1638
ZM_snf_group 642818
ZM_snf_no_divide 1063357
ZM_snfall 63805
ZM_snfall_i 711764
ZM_snfclean 944252
ZMrow_divexact_inplace 861293
ZV_allequal 219762
ZV_extgcd 109032
ZV_gcdext_i 109046
ZV_hnfgcdext 21
ZV_snf_group 301368
ZV_snf_rank 91
ZV_snf_rank_u 49
ZV_snf_trunc 0
ZV_snfall 301368
ZV_snfclean 214160
ZpM_echelon 524254
allhnfmod 397347
bezout_step 695631
col_dup 2652744
col_mul 2693469
count 7979930
count2 410044
do_zero 0
findi 105953241
findi_normalize 105915959
gbezout_step 882
gsmith 0
gsmithall 0
gsnf_no_divide 196
hnf 14
hnf_divscale 195924
hnf_i 54420
hnf_invimage 365800
hnf_invscale 236789
hnf_solve 314481
hnfadd 0
hnfadd_i 76583
hnfall 14
hnfallgen 21
hnfdivide 133
hnffinal 210546
hnflll 7
hnfmerge_get_1 741118
hnfmod 14
hnfmodid 397334
hnfperm 14
hnfspec 0
hnfspec_i 133962
hnfswap 8371354
is_RgX 2590
mathnf0 287
mathnfspec 0
matsnf0 469
must_swap 4732282
negcmpii 517581
normalize_as_RgX 364
optimal_D 4771943
p_mat 0
reduce1 949238
reduce2 52956625
remove_0cols 309795
reverse_rows 427463
smith 385
smithall 35
smithclean 693
snf_group 944258
snf_pile 972095
snf_pile1 63
snfrank 154
trivsmith 0
update 673383
zlm_echelon 4650279
zv_snf_rank 0

Generated by: LCOV version 1.14