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 17842-03c132c) Lines: 1108 1148 96.5 %
Date: 2015-05-24 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 1543423197
addshiftw 85047858
adduispec 839297991
adduispec_offset 212436846
addumului 543120
affir 96516537
catii 50045058
cmpiispec 1901170677
convi 225636
convi_dac 1033029
diviiexact 265054476
divis 193383
divis_rem 29920737
diviu_rem 95465172
diviuexact 3727404
diviuexact_i 13943910
diviuuexact 171219
divri 11843496
divrr 72421986
dvmdii 442342356
equaliispec 21380505
floorr 268659
incloop 10913328
incneg 4638
incpos 10901916
int_normalize 159099330
mantissa2nr 8650554
muliifft_dis 733011
muliifft_dit 1369617
muliifft_spliti 5871
muliifft_unspliti 3117
muliispec 1108038513
muliispec_basecase 1079504463
muliispec_fft 2754
mulliifft_params 3117
muluispec 1075114377
muluui 187875
p_sqrtu1 11131176
p_sqrtu2 10089573
pari_kernel_close 540
pari_kernel_init 540
red_montgomery 6256983
remi2n 6024123
resetloop 109206
roundr_up_ip 84925952
setloop 1135380
shiftispec 240688872
sqrispec 459452652
sqrispec_basecase 457272165
sqrispec_fft 363
sqrtispec 35108757
sqrtispec1_sh 1041603
sqrtispec2 10086228
sqrtispec2_sh 3345
sqrtr_abs 10078560
sqrtremi 1052616
subiispec 1466887245
subiuspec 807916348
truncr 311628
umodiu 727952358
xmpn_copy 115161324
xmpn_zero 10078560

Generated by: LCOV version 1.9