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 28880-3b5364847c) Lines: 1557 1728 90.1 %
Date: 2023-12-01 07:53:15 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 24365
ZM_hnfcenter 25076
hnf_i 54354
ZM_snfall 63798
hnfadd_i 76343
ZM_hnf 77242
ZV_extgcd 108815
ZV_gcdext_i 108829
hnfspec_i 133954
ZM_hnfmod 155371
hnf_divscale 195875
ZM_rowrankprofile 210296
hnffinal 210297
ZM_hnflll 213487
ZV_snfclean 214050
ZV_allequal 219631
hnf_invscale 236781
ZV_snf_group 301254
ZV_snfall 301256
remove_0cols 309517
hnf_solve 314275
hnf_invimage 365589
hnfmodid 397057
allhnfmod 397071
count2 409600
reverse_rows 426968
negcmpii 517431
ZpM_echelon 519677
hnfmerge_get_1 640793
ZM_snf_group 642698
update 673466
bezout_step 695691
ZM_snfall_i 711514
ZM_hnfall_i 717398
ZMrow_divexact_inplace 861307
ZM_snfclean 944010
snf_group 944018
reduce1 948741
snf_pile 971743
ZM_snf_no_divide 1063415
ZM_redpart 1378367
Minus 2029173
col_dup 2652648
col_mul 2693847
FpM_echelon 2750348
ZM_hnfmodprime 2750357
FpM_hnfend 2750518
ZM_hnfmodid 3865427
ZM_reduce 4123944
ZM_hnfmodall 4419187
zlm_echelon 4454536
optimal_D 4465439
ZM_hnfmodall_i 4468516
FpV_Fp_mul_part_ip 4695164
must_swap 4722980
count 7982653
hnfswap 8370812
FpV_red_part_ipvec 33104734
ZC_elem 36923112
reduce2 53000880
findi_normalize 106079088
findi 106088817

Generated by: LCOV version 1.14