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-03-18 08:03:28 Functions: 90 100 90.0 %
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
RgXM_snf 49
ZV_snf_rank_u 49
snf_pile1 63
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
ZM_snf 1638
is_RgX 2590
ZM_hnfall 24382
ZM_hnfcenter 25078
hnf_i 54395
ZM_snfall 63805
hnfadd_i 76876
ZM_hnf 77300
ZV_extgcd 109032
ZV_gcdext_i 109046
hnfspec_i 133964
ZM_hnfmod 155469
hnf_divscale 195923
hnffinal 210840
ZM_rowrankprofile 210841
ZM_hnflll 214031
ZV_snfclean 214168
ZV_allequal 219764
hnf_invscale 236791
ZV_snf_group 301359
ZV_snfall 301360
remove_0cols 309760
hnf_solve 314487
hnf_invimage 365805
hnfmodid 397335
allhnfmod 397348
count2 410183
reverse_rows 428046
negcmpii 517569
ZpM_echelon 524254
ZM_snf_group 642800
update 673429
bezout_step 695697
ZM_snfall_i 711750
ZM_hnfall_i 717601
hnfmerge_get_1 741117
ZMrow_divexact_inplace 861313
ZM_snfclean 944242
snf_group 944244
reduce1 949238
snf_pile 972086
ZM_snf_no_divide 1063384
ZM_redpart 1378140
Minus 2025447
col_dup 2652746
col_mul 2693679
ZM_hnfmodprime 3167908
FpM_echelon 3167911
FpM_hnfend 3168237
ZM_reduce 4124050
ZM_hnfmodid 4172155
zlm_echelon 4650331
ZM_hnfmodall 4726144
must_swap 4732622
optimal_D 4773086
ZM_hnfmodall_i 4775203
FpV_Fp_mul_part_ip 5297634
count 7979958
hnfswap 8372746
FpV_red_part_ipvec 35112471
ZC_elem 39073690
reduce2 52960300
findi_normalize 105922186
findi 105956973

Generated by: LCOV version 1.14