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 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.10.0 lcov report (development 21351-66b5338) Lines: 1105 1148 96.3 %
Date: 2017-11-22 06:21:08 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 636
pari_kernel_init 638
sqrispec_fft 1056
incneg 4701
muliispec_fft 10512
muliifft_unspliti 11568
mulliifft_params 11568
muliifft_spliti 22080
resetloop 127959
Zf_sqr 174720
convi 265877
sqrtispec2_sh 292101
floorr 346509
divis 358905
diviuuexact 402456
muluui 419112
addumului 428328
convi_dac 1018980
truncr 1189365
setloop 1871310
Zf_mul 2043264
sqrtispec1_sh 2143171
muliifft_dis 2206416
sqrtremi 2500342
muliifft_dit 4239168
remi2n 6727341
mantissa2nr 9809328
diviuexact_i 15830334
divri 16329798
sqrtr_abs 16407150
xmpn_zero 16407150
sqrtispec2 16472220
p_sqrtu2 16764321
p_sqrtu1 18907492
incpos 19652064
incloop 19684551
divis_rem 22399134
red_montgomery 24023637
diviuexact 24672471
Zf_add 26745024
Zf_mulsqrt2 26745024
Zf_sub 27034923
Zf_shift 28305471
sqrtispec 50683374
Zf_red_destroy 54728658
catii 68422308
divrr 68553510
equaliispec 75411763
affir 88999299
diviu_rem 103730775
addshiftw 129704061
adduispec_offset 135380859
int_normalize 155655864
xmpn_copy 161069217
diviiexact 187509575
roundr_up_ip 231345254
shiftispec 382294743
dvmdii 513459966
sqrispec_basecase 578997378
sqrispec 582533661
subiuspec 672203024
adduispec 853052595
umodiu 954182294
subiispec 1359506337
muluispec 1727557685
muliispec_basecase 1759134149
addiispec 1770647262
cmpiispec 1783145691
muliispec 1804186205

Generated by: LCOV version 1.11