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.12.0 lcov report (development 23814-c9f15e206) Lines: 1119 1151 97.2 %
Date: 2019-04-21 05:44:00 Functions: 69 69 100.0 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
pari_kernel_close 660
pari_kernel_init 662
sqrispec_fft 1182
incneg 6054
muliispec_fft 10806
muliifft_unspliti 11988
mulliifft_params 11988
muliifft_spliti 22794
diviuuexact 100815
muluui 117483
resetloop 127992
Zf_sqr 269184
convi 276018
sqrtispec2_sh 327666
addumului 535137
floorr 589224
divis 870780
convi_dac 957567
truncr 1473600
Zf_mul 1896576
muliifft_dis 2153772
setloop 2235459
sqrtispec1_sh 2375955
sqrtremi 2789583
muliifft_dit 4039542
remi2n 8621643
mantissa2nr 12594762
diviuexact_i 16528518
sqrtr_abs 20326206
xmpn_zero 20326206
incpos 20331336
sqrtispec2 20412162
incloop 20586171
p_sqrtu2 20739828
red_montgomery 21580050
divri 22656288
p_sqrtu1 23115783
Zf_add 24642624
Zf_mulsqrt2 24642624
Zf_sub 25001739
Zf_shift 26435667
diviuexact 27728391
divis_rem 35526615
Zf_red_destroy 51164184
sqrtispec 65586573
divrr 85925355
catii 90348822
affir 110861598
absdiviu_rem 116240742
equaliispec 123795316
addshiftw 139654284
adduispec_offset 140943486
int_normalize 179503800
xmpn_copy 210439221
diviiexact 231153720
roundr_up_ip 267442028
shiftispec 436866920
dvmdii 564176939
sqrispec_basecase 612386910
sqrispec 617249235
subiuspec 716387453
adduispec 951944301
umodiu 1056489302
subiispec 1417693923
addiispec 1849095483
cmpiispec 1849114770
muluispec 1900418016
muliispec_basecase 1918028096
muliispec 1961125571

Generated by: LCOV version 1.13