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 17960-0cd23ba) Lines: 1108 1148 96.5 %
Date: 2015-09-03 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 32912448
Zf_mul 1778304
Zf_mulsqrt2 32912448
Zf_red_destroy 64713447
Zf_shift 33170409
Zf_sqr 373248
Zf_sub 33179391
addiispec 1744959369
addshiftw 125662833
adduispec 886471560
adduispec_offset 219354687
addumului 543180
affir 96752457
catii 50729004
cmpiispec 2019409650
convi 226793
convi_dac 1033620
diviiexact 277152057
divis 195903
divis_rem 29938350
diviu_rem 96047394
diviuexact 7101501
diviuexact_i 13995918
diviuuexact 172902
divri 11851179
divrr 72938664
dvmdii 474457653
equaliispec 23256534
floorr 268659
incloop 17971050
incneg 4638
incpos 17959638
int_normalize 200871708
mantissa2nr 8879316
muliifft_dis 2147817
muliifft_dit 3922878
muliifft_spliti 6978
muliifft_unspliti 3735
muliispec 1266817584
muliispec_basecase 1217982684
muliispec_fft 3243
mulliifft_params 3735
muluispec 1189552011
muluui 189558
p_sqrtu1 11723781
p_sqrtu2 10498788
pari_kernel_close 543
pari_kernel_init 543
red_montgomery 6389556
remi2n 6402387
resetloop 109206
roundr_up_ip 113064383
setloop 1631913
shiftispec 317541060
sqrispec 467000613
sqrispec_basecase 464408856
sqrispec_fft 492
sqrtispec 35859567
sqrtispec1_sh 1224993
sqrtispec2 10495065
sqrtispec2_sh 3723
sqrtr_abs 10487391
sqrtremi 1236390
subiispec 1591315662
subiuspec 854993356
truncr 493479
umodiu 779798913
xmpn_copy 117103035
xmpn_zero 10487391

Generated by: LCOV version 1.9