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 - ZV.c (source / functions) Hit Total Coverage
Test: PARI/GP v2.18.1 lcov report (development 29873-a0b27995a4) Lines: 800 938 85.3 %
Date: 2025-01-14 09:09:31 Functions: 122 139 87.8 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
Flc_lincomb1_inplace 29697946
QM_QC_mul 126563
QM_mul 557793
QM_sqr 700
RgM_check_ZM 650446
RgV_check_ZV 1421569
ZC_Q_mul 2719200
ZC_ZV_mul 0
ZC_Z_add 365311
ZC_Z_div 3663890
ZC_Z_divexact 5271531
ZC_Z_mul 34634084
ZC_Z_sub 0
ZC_add 26013576
ZC_add_i 36134860
ZC_copy 14705474
ZC_divexactu 2261
ZC_hnfdivrem 10748624
ZC_is_ei 165366
ZC_lincomb 33269706
ZC_lincomb1 15380711
ZC_lincomb1_inplace 62147080
ZC_lincomb1_inplace_i 73080072
ZC_lincomb_1 739818
ZC_neg 6300017
ZC_reducemodlll 97933
ZC_reducemodmatrix 111405
ZC_reducemodmatrix_i 111404
ZC_sub 8754750
ZC_sub_i 9054301
ZC_z_mul 62111
ZMV_to_zmV 49
ZM_Q_mul 1089400
ZM_ZC_mul 24111222
ZM_ZC_mul_i 74540631
ZM_Z_div 18064
ZM_Z_divexact 471500
ZM_Z_mul 3216410
ZM_add 878625
ZM_copy 638650
ZM_det_triangular 3952477
ZM_diag_mul 533905
ZM_divexactu 441
ZM_equal 3325828
ZM_equal0 72442
ZM_hnfdivrem 454469
ZM_isdiagonal 556624
ZM_ishnf 751681
ZM_isidentity 654790
ZM_isscalar 157361
ZM_max_expi 0
ZM_max_expi_i 0
ZM_max_lg 22298
ZM_max_lg_i 26718861
ZM_mul 20286544
ZM_mul_classical 13285874
ZM_mul_diag 21
ZM_mul_fast 839
ZM_mul_i 20664991
ZM_mul_slice 1103
ZM_mul_sw 73586
ZM_mul_worker 1103
ZM_multosym 0
ZM_nc_mul_i 0
ZM_neg 1658159
ZM_nm_mul 0
ZM_pow 0
ZM_powu 22799
ZM_reducemodlll 0
ZM_reducemodmatrix 227030
ZM_reducemodmatrix_i 227029
ZM_sqr 24395
ZM_sqr_fast 0
ZM_sqr_i 24395
ZM_sqr_slice 0
ZM_sqr_worker 0
ZM_sub 91459
ZM_supnorm 4197
ZM_to_zm 1022
ZM_togglesign 0
ZM_transmul 2289
ZM_transmultosym 532221
ZM_zc_mul 17212619
ZM_zc_mul_i 19276678
ZM_zm_mul 975348
ZMrow_ZC_mul 135145466
ZMrow_ZC_mul_i 575146070
ZMrow_equal0 16231
ZRED 1035718
ZV_ZM_mul 230629
ZV_abscmp 19740
ZV_cmp 3147094
ZV_content 297351
ZV_dotproduct 16192983
ZV_dotproduct_i 19182266
ZV_dotsquare 6658821
ZV_equal 294991
ZV_equal0 14391258
ZV_equal_lg 6226049
ZV_max_expi 0
ZV_max_expi_i 0
ZV_max_lg 10640
ZV_max_lg_i 108208747
ZV_neg_inplace 344146
ZV_prod 8829284
ZV_sum 77
ZV_to_nv 466204
ZV_togglesign 5036725
ZV_zc_mul 2229528
Z_ZC_sub 545753
ZincrementalGS 1187307
Zupdate_row 360375
_ZM_mul 280
_ZM_sqr 23324
_mulii 318571083
add_slices 588688
check_ZV 1930877
nm_Z_mul 0
subtract_slices 515102
sw_bound 13359461
vecsmall_prod 14694393
zmV_to_ZMV 126
zm_to_Flm 22694
zm_to_ZM 156356
zvV_equal 1638
zv_ZM_mul 1736
zv_abs 77
zv_content 18454463
zv_dotproduct 196399119
zv_equal 30984976
zv_equal0 23103583
zv_neg 51679
zv_neg_inplace 126
zv_prod 950595
zv_prod_Z 1864468
zv_sum 16490
zv_sumpart 0
zv_to_Flv 366646
zv_z_mul 28456

Generated by: LCOV version 1.16