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 - language - compile.c (source / functions) Hit Total Coverage
Test: PARI/GP v2.8.0 lcov report (development 16624-25b9976) Lines: 1223 1411 86.7 %
Date: 2014-06-24 Functions: 70 75 93.3 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 662 864 76.6 %

Function Name Sort by function name Hit count Sort by hit count
cattovec 13810
checkdups 5262
closure_deriv 10
closurefunc 3296
compilecall 4485
compilecast 3339831
compilecast_loc 3340556
compilefunc 1667395
compilefuncinline 5680
compilelambda 0
compilelocal 5
compilelvalue 335
compilemat 4200
compilematcoeff 2146
compilemy 540
compilenewptr 160
compilenode 8483506
compileseq 3864
compilesmall 4431149
compilestate_reset 75
compilestate_restore 12386
compilestate_save 914651
compilestore 8781
compileuninline 0
compileuserfunc 4360
compilevec 2497981
copyifclone 65481
countlisttogen 8395998
countvar 545
ctxmvar 1129
data_push 1100499
debug_context 0
detag 98935
first_safe_arg 3341795
frame_push 5277
genclosure 3336
get_ret_type 2038597
getclosure 5720
getcodepos 45950
getentry 86424
getfunc 3425892
getfunction 45945
getlvalue 9421
getmvar 82558
getvar 17647
gp_closure 38366
is_func_named 13343912
is_node_zero 735
listtogen 8395948
localpush 30
localvars_find 10
localvars_read_str 6985
matindex_type 2511
op_insert_loc 1770
op_push 18531496
op_push_loc 18931456
optimizecall 4490
optimizefunc 1665959
optimizemat 4200
optimizematcoeff 2321
optimizenode 9802471
optimizeseq 3864
optimizevec 2498066
pack_localvars 20
pari_close_compiler 881
pari_init_compiler 913
parseproto 4506227
push_frame 125
snm_closure 0
str_defproto 160
strntoGENexp 733559
strtoclosure 40
strtofunction 0
var_push 29962
vec_optimize 2532082

Generated by: LCOV version 1.9