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.8.0 lcov report (development 18889-ac2cbba) Lines: 1108 1148 96.5 %
Date: 2016-05-01 Functions: 69 69 100.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 926 1110 83.4 %

Function Name Sort by function name Hit count Sort by hit count
Zf_add 33523200
Zf_mul 1822464
Zf_mulsqrt2 33523200
Zf_red_destroy 65956041
Zf_shift 33815460
Zf_sqr 366720
Zf_sub 33806196
addiispec 1838293800
addshiftw 151193964
adduispec 902900631
adduispec_offset 212087970
addumului 543285
affir 96767082
catii 60821844
cmpiispec 2076722418
convi 235218
convi_dac 1063383
diviiexact 189477060
divis 251787
divis_rem 22845348
diviu_rem 98892078
diviuexact 8303772
diviuexact_i 15770349
diviuuexact 387987
divri 13247556
divrr 81230736
dvmdii 479566254
equaliispec 25786404
floorr 284892
incloop 18119565
incneg 4641
incpos 18099804
int_normalize 198719898
mantissa2nr 9042759
muliifft_dis 2185347
muliifft_dit 4004475
muliifft_spliti 7173
muliifft_unspliti 3837
muliispec 1372504200
muliispec_basecase 1312947825
muliispec_fft 3336
mulliifft_params 3837
muluispec 1281621093
muluui 404643
p_sqrtu1 14605230
p_sqrtu2 13350933
pari_kernel_close 564
pari_kernel_init 564
red_montgomery 6729864
remi2n 6349173
resetloop 117528
roundr_up_ip 126478394
setloop 1674744
shiftispec 339247350
sqrispec 484958865
sqrispec_basecase 482290101
sqrispec_fft 501
sqrtispec 43757379
sqrtispec1_sh 1254297
sqrtispec2 13346457
sqrtispec2_sh 4476
sqrtr_abs 13338432
sqrtremi 1266798
subiispec 1632045237
subiuspec 869600857
truncr 503073
umodiu 804035721
xmpn_copy 141551484
xmpn_zero 13338432

Generated by: LCOV version 1.9