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 - kernel/none - mp.c (source / functions) Hit Total Coverage
Test: PARI/GP v2.18.1 lcov report (development 29877-9124a6ce27) Lines: 1115 1153 96.7 %
Date: 2025-01-18 09:08:44 Functions: 69 70 98.6 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
addumului 0
pari_kernel_version 2
pari_kernel_close 774
pari_kernel_init 776
sqrispec_fft 1659
incneg 49989
muliispec_fft 83409
muliifft_unspliti 85068
mulliifft_params 85068
resetloop 130656
diviuuexact 149130
muluui 165798
muliifft_spliti 168477
sqrtispec2_sh 275019
convi 315896
Zf_sqr 448896
divis 721875
convi_dac 733710
setloop 2247009
truncr 2613753
sqrtispec1_sh 2699733
sqrtremi 3761835
floorr 5229609
Zf_mul 15283584
muliifft_dis 15647412
remi2n 18481644
diviuexact 22143957
diviuexact_i 29475291
muliifft_dit 30847587
incpos 31953747
incloop 32256207
red_montgomery 39035064
mantissa2nr 48682809
divis_rem 65014488
sqrtr_abs 90882495
xmpn_zero 90882495
sqrtispec2 91669023
p_sqrtu2 91944042
p_sqrtu1 94643775
divri 113279049
divrr 129495234
Zf_add 186970176
Zf_mulsqrt2 186970176
Zf_sub 190355244
equaliispec 200780253
Zf_shift 205469481
absdiviu_rem 270713994
affir 320284926
sqrtispec 325807527
adduispec_offset 352286694
diviiexact 375851376
Zf_red_destroy 397737516
roundr_up_ip 443554570
catii 468277008
addshiftw 651793083
int_normalize 847277238
sqrispec_basecase 899883450
sqrispec 907228368
xmpn_copy 1068008355
shiftispec 1273628490
umodiu 1409721822
dvmdii 1474728540
subiuspec 1542130266
adduispec 2252855481
subiispec 3311380968
cmpiispec 4010332377
addiispec 4405499742
muluispec 4728432795
muliispec_basecase 5077985634
muliispec 5281302888

Generated by: LCOV version 1.16