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: 1559 1728 90.2 %
Date: 2024-05-03 08:08:58 Functions: 90 100 90.0 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
FpM_echelon 3167987
FpM_hnfend 3168242
FpV_Fp_mul_part_ip 5297624
FpV_red_part_ipvec 35106889
Minus 2025595
RgC_elem 511
RgM_hnfall 42
RgM_reduce 84
RgXM_snf 49
ZC_elem 39079155
ZM_hnf 77342
ZM_hnf_knapsack 238
ZM_hnfall 24398
ZM_hnfall_i 717621
ZM_hnfcenter 25084
ZM_hnflll 213909
ZM_hnfmod 155470
ZM_hnfmodall 4725529
ZM_hnfmodall_i 4774579
ZM_hnfmodid 4171555
ZM_hnfmodprime 3167981
ZM_hnfperm 385
ZM_redpart 1378098
ZM_reduce 4133472
ZM_rowrankprofile 210714
ZM_snf 1638
ZM_snf_group 642821
ZM_snf_no_divide 1063386
ZM_snfall 63805
ZM_snfall_i 711769
ZM_snfclean 944249
ZMrow_divexact_inplace 861343
ZV_allequal 219754
ZV_extgcd 109032
ZV_gcdext_i 109046
ZV_hnfgcdext 21
ZV_snf_group 301365
ZV_snf_rank 91
ZV_snf_rank_u 49
ZV_snf_trunc 0
ZV_snfall 301364
ZV_snfclean 214167
ZpM_echelon 524242
allhnfmod 397346
bezout_step 695712
col_dup 2652692
col_mul 2693810
count 7979139
count2 410123
do_zero 0
findi 105990442
findi_normalize 105955752
gbezout_step 882
gsmith 0
gsmithall 0
gsnf_no_divide 196
hnf 14
hnf_divscale 195924
hnf_i 54421
hnf_invimage 365802
hnf_invscale 236791
hnf_solve 314485
hnfadd 0
hnfadd_i 76754
hnfall 14
hnfallgen 21
hnfdivide 133
hnffinal 210717
hnflll 7
hnfmerge_get_1 741102
hnfmod 14
hnfmodid 397333
hnfperm 14
hnfspec 0
hnfspec_i 133962
hnfswap 8375733
is_RgX 2590
mathnf0 287
mathnfspec 0
matsnf0 469
must_swap 4733550
negcmpii 517574
normalize_as_RgX 364
optimal_D 4772455
p_mat 0
reduce1 949238
reduce2 52977181
remove_0cols 309814
reverse_rows 427803
smith 385
smithall 35
smithclean 693
snf_group 944253
snf_pile 972092
snf_pile1 63
snfrank 154
trivsmith 0
update 673470
zlm_echelon 4650303
zv_snf_rank 0

Generated by: LCOV version 1.14