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 17784-cfd2407) Lines: 1108 1148 96.5 %
Date: 2015-04-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 1542959820
addshiftw 85392939
adduispec 839253750
adduispec_offset 212433909
addumului 543120
affir 96738303
catii 50735316
cmpiispec 1900740669
convi 225472
convi_dac 1032546
diviiexact 265089471
divis 197442
divis_rem 29925354
diviu_rem 94701015
diviuexact 3638985
diviuexact_i 13885311
diviuuexact 84888
divri 11362275
divrr 72311100
dvmdii 441951849
equaliispec 21379851
floorr 268650
incloop 10909677
incneg 4488
incpos 10898415
int_normalize 159787920
mantissa2nr 8608056
muliifft_dis 733011
muliifft_dit 1369617
muliifft_spliti 5871
muliifft_unspliti 3117
muliispec 1107667044
muliispec_basecase 1079133012
muliispec_fft 2754
mulliifft_params 3117
muluispec 1074933222
muluui 101544
p_sqrtu1 11206143
p_sqrtu2 10165143
pari_kernel_close 537
pari_kernel_init 537
red_montgomery 6256983
remi2n 6023439
resetloop 109206
roundr_up_ip 85200422
setloop 1135335
shiftispec 240622383
sqrispec 469735047
sqrispec_basecase 467554566
sqrispec_fft 363
sqrtispec 35529459
sqrtispec1_sh 1041000
sqrtispec2 10161801
sqrtispec2_sh 3342
sqrtr_abs 10154139
sqrtremi 1052004
subiispec 1466352837
subiuspec 807950566
truncr 311628
umodiu 727917786
xmpn_copy 116636424
xmpn_zero 10154139

Generated by: LCOV version 1.9