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

Generated by: LCOV version 1.16