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 16804-345a01c) Lines: 1225 1413 86.7 %
Date: 2014-09-20 Functions: 70 75 93.3 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 670 873 76.7 %

Function Name Sort by function name Hit count Sort by hit count
cattovec 19110
checkdups 7034
closure_deriv 14
closurefunc 4499
compilecall 6279
compilecast 4648709
compilecast_loc 4649724
compilefunc 2324277
compilefuncinline 7731
compilelambda 0
compilelocal 7
compilelvalue 469
compilemat 5880
compilematcoeff 2870
compilemy 756
compilenewptr 224
compilenode 11856926
compileseq 5345
compilesmall 6206521
compilestate_reset 105
compilestate_restore 17938
compilestate_save 1279759
compilestore 12348
compileuninline 0
compileuserfunc 6104
compilevec 3497215
copyifclone 87663
countlisttogen 11734386
countvar 763
ctxmvar 1589
data_push 1535306
debug_context 0
detag 134058
first_safe_arg 4658431
frame_push 7055
genclosure 4555
get_ret_type 2830337
getclosure 7787
getcodepos 63457
getentry 116481
getfunc 4771843
getfunction 63450
getlvalue 13251
getmvar 111517
getvar 24319
gp_closure 53052
is_func_named 18600197
is_node_zero 1029
listtogen 11734316
localpush 42
localvars_find 14
localvars_read_str 9793
matindex_type 3381
op_insert_loc 1477
op_push 25943364
op_push_loc 26488037
optimizecall 6286
optimizefunc 2322410
optimizemat 5880
optimizematcoeff 3115
optimizenode 13706897
optimizeseq 5345
optimizevec 3497334
pack_localvars 42
pari_close_compiler 1182
pari_init_compiler 1194
parseproto 6231331
push_frame 175
snm_closure 0
str_defproto 224
strntoGENexp 1026968
strtoclosure 56
strtofunction 0
var_push 41614
vec_optimize 3544822

Generated by: LCOV version 1.9