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 19053-42ab05e) Lines: 1108 1148 96.5 %
Date: 2016-06-29 Functions: 69 69 100.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 926 1112 83.3 %

Function Name Sort by function name Hit count Sort by hit count
Zf_add 35481984
Zf_mul 1999872
Zf_mulsqrt2 35481984
Zf_red_destroy 70738686
Zf_shift 36244314
Zf_sqr 425088
Zf_sub 35749893
addiispec 1935111771
addshiftw 156778845
adduispec 922720920
adduispec_offset 215052660
addumului 325713
affir 96798216
catii 60947982
cmpiispec 2097738858
convi 236032
convi_dac 1069902
diviiexact 191261595
divis 253002
divis_rem 22617990
diviu_rem 99007047
diviuexact 8393235
diviuexact_i 15890337
diviuuexact 389859
divri 13263234
divrr 81357549
dvmdii 497194353
equaliispec 36194709
floorr 284937
incloop 18127788
incneg 4641
incpos 18107619
int_normalize 206787516
mantissa2nr 9043785
muliifft_dis 2418825
muliifft_dit 4413642
muliifft_spliti 11190
muliifft_unspliti 6135
muliispec 1494826299
muliispec_basecase 1433238753
muliispec_fft 5055
mulliifft_params 6135
muluispec 1347379806
muluui 406515
p_sqrtu1 14638644
p_sqrtu2 13383765
pari_kernel_close 564
pari_kernel_init 564
red_montgomery 6719586
remi2n 6349404
resetloop 117528
roundr_up_ip 126601649
setloop 1677144
shiftispec 345041331
sqrispec 488111988
sqrispec_basecase 484709409
sqrispec_fft 1080
sqrtispec 43853505
sqrtispec1_sh 1254879
sqrtispec2 13379514
sqrtispec2_sh 4251
sqrtr_abs 13371789
sqrtremi 1266855
subiispec 1660645263
subiuspec 867247063
truncr 503106
umodiu 771151860
xmpn_copy 141846768
xmpn_zero 13371789

Generated by: LCOV version 1.9