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-bordeaux1.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.8.0 lcov report (development 17704-6959f5a) Lines: 1108 1148 96.5 %
Date: 2015-03-27 Functions: 69 69 100.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 925 1110 83.3 %

Function Name Sort by function name Hit count Sort by hit count
Zf_add 8663232
Zf_mul 639360
Zf_mulsqrt2 8663232
Zf_red_destroy 16315077
Zf_shift 8525430
Zf_sqr 96768
Zf_sub 8864283
addiispec 1439112300
addshiftw 79945356
adduispec 830515449
adduispec_offset 212331141
addumului 543114
affir 92697318
catii 39877158
cmpiispec 1682676825
convi 225171
convi_dac 1031796
diviiexact 262195317
divis 26301
divis_rem 29652042
diviu_rem 94280694
diviuexact 3522402
diviuexact_i 12192888
diviuuexact 59160
divri 10241094
divrr 69539568
dvmdii 431861235
equaliispec 21358977
floorr 268506
incloop 10871547
incneg 4038
incpos 10860828
int_normalize 148847562
mantissa2nr 8548482
muliifft_dis 733011
muliifft_dit 1369617
muliifft_spliti 5871
muliifft_unspliti 3117
muliispec 1097562036
muliispec_basecase 1069035570
muliispec_fft 2754
mulliifft_params 3117
muluispec 1065630006
muluui 75816
p_sqrtu1 9343983
p_sqrtu2 8303001
pari_kernel_close 528
pari_kernel_init 528
red_montgomery 6256404
remi2n 6012411
resetloop 109206
roundr_up_ip 76589909
setloop 1106655
shiftispec 224054190
sqrispec 463930812
sqrispec_basecase 461752227
sqrispec_fft 363
sqrtispec 28238238
sqrtispec1_sh 1040982
sqrtispec2 8299659
sqrtispec2_sh 3342
sqrtr_abs 8292000
sqrtremi 1051983
subiispec 1354608003
subiuspec 795553473
truncr 311223
umodiu 728004657
xmpn_copy 92176860
xmpn_zero 8292000

Generated by: LCOV version 1.9