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
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 259
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 22378
ZM_hnfcenter 25120
hnf_i 56725
ZM_snfall 63783
hnfadd_i 75562
ZM_hnf 77626
ZV_extgcd 108815
ZV_gcdext_i 108829
hnfspec_i 133928
ZM_hnfmod 154985
hnf_divscale 199489
ZM_rowrankprofile 209493
hnffinal 209494
ZM_hnflll 212672
ZV_snfclean 213956
ZV_allequal 219554
hnf_invscale 236583
ZV_snf_group 301158
ZV_snfall 301158
remove_0cols 309807
hnf_solve 313903
hnf_invimage 365101
count2 381748
hnfmodid 400708
allhnfmod 400722
reverse_rows 425330
negcmpii 517245
ZpM_echelon 522160
hnfmerge_get_1 637211
ZM_snf_group 642369
update 673056
bezout_step 695312
ZM_snfall_i 711184
ZM_hnfall_i 716017
ZMrow_divexact_inplace 860855
ZM_snfclean 943587
snf_group 943596
reduce1 952053
snf_pile 971306
ZM_snf_no_divide 1062650
ZM_redpart 1376743
Minus 2008854
col_dup 2585414
col_mul 2692216
FpM_echelon 2830074
ZM_hnfmodprime 2830083
FpM_hnfend 2830232
ZM_hnfmodid 3989416
ZM_reduce 4189296
must_swap 4323413
zlm_echelon 4462662
ZM_hnfmodall 4546371
optimal_D 4592305
ZM_hnfmodall_i 4595514
FpV_Fp_mul_part_ip 4864119
count 8308215
hnfswap 8479726
FpV_red_part_ipvec 35000738
ZC_elem 40165579
reduce2 47261916
findi_normalize 94595132
findi 94601097

Generated by: LCOV version 1.14