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.1 lcov report (development 28676-df828f1c94) Lines: 1554 1728 89.9 %
Date: 2023-08-26 07:54:43 Functions: 90 100 90.0 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
FpM_echelon 2830074
FpM_hnfend 2830232
FpV_Fp_mul_part_ip 4864119
FpV_red_part_ipvec 35000738
Minus 2008854
RgC_elem 511
RgM_hnfall 42
RgM_reduce 84
RgXM_snf 49
ZC_elem 40165579
ZM_hnf 77626
ZM_hnf_knapsack 238
ZM_hnfall 22378
ZM_hnfall_i 716017
ZM_hnfcenter 25120
ZM_hnflll 212672
ZM_hnfmod 154985
ZM_hnfmodall 4546371
ZM_hnfmodall_i 4595514
ZM_hnfmodid 3989416
ZM_hnfmodprime 2830083
ZM_hnfperm 385
ZM_redpart 1376743
ZM_reduce 4189296
ZM_rowrankprofile 209493
ZM_snf 1638
ZM_snf_group 642369
ZM_snf_no_divide 1062650
ZM_snfall 63783
ZM_snfall_i 711184
ZM_snfclean 943587
ZMrow_divexact_inplace 860855
ZV_allequal 219554
ZV_extgcd 108815
ZV_gcdext_i 108829
ZV_hnfgcdext 21
ZV_snf_group 301158
ZV_snf_rank 91
ZV_snf_rank_u 49
ZV_snf_trunc 0
ZV_snfall 301158
ZV_snfclean 213956
ZpM_echelon 522160
allhnfmod 400722
bezout_step 695312
col_dup 2585414
col_mul 2692216
count 8308215
count2 381748
do_zero 0
findi 94601097
findi_normalize 94595132
gbezout_step 882
gsmith 0
gsmithall 0
gsnf_no_divide 196
hnf 14
hnf_divscale 199489
hnf_i 56725
hnf_invimage 365101
hnf_invscale 236583
hnf_solve 313903
hnfadd 0
hnfadd_i 75562
hnfall 14
hnfallgen 21
hnfdivide 133
hnffinal 209494
hnflll 7
hnfmerge_get_1 637211
hnfmod 14
hnfmodid 400708
hnfperm 14
hnfspec 0
hnfspec_i 133928
hnfswap 8479726
is_RgX 2590
mathnf0 259
mathnfspec 0
matsnf0 469
must_swap 4323413
negcmpii 517245
normalize_as_RgX 364
optimal_D 4592305
p_mat 0
reduce1 952053
reduce2 47261916
remove_0cols 309807
reverse_rows 425330
smith 385
smithall 35
smithclean 693
snf_group 943596
snf_pile 971306
snf_pile1 63
snfrank 154
trivsmith 0
update 673056
zlm_echelon 4462662
zv_snf_rank 0

Generated by: LCOV version 1.14