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 17236-ec2ebc9) Lines: 1241 1433 86.6 %
Date: 2014-12-19 Functions: 71 78 91.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 678 884 76.7 %

Function Name Sort by function name Hit count Sort by hit count
cattovec 21868
checkdups 7657
closure_deriv 7
closurefunc 4289
compilecall 13440
compilecast 4698394
compilecast_loc 4699381
compilefunc 2340692
compilefuncinline 8564
compilelambda 0
compilelocal 7
compilelvalue 567
compilemat 6048
compilematcoeff 4683
compilemy 1022
compilenewptr 266
compilenode 11922931
compileseq 5590
compilesmall 6215554
compilestate_reset 112
compilestate_restore 20976
compilestate_save 1286479
compilestore 15603
compileuninline 0
compilevec 3498993
copyifclone 106605
countlisttogen 11791212
countvar 1029
ctxmvar 5271
data_push 1544592
debug_context 0
detag 163192
fetch_member_raw 18753
first_safe_arg 4711736
frame_push 10870
genclosure 4296
get_ret_type 2860572
getclosure 8620
getcodepos 70513
getentry 140309
getfunc 4843215
getfunction 70506
getlvalue 16660
getmvar 140812
getvar 29415
gp_closure 55628
is_func_named 18718189
is_node_zero 1470
listtogen 11791142
localpush 42
localvars_find 7
localvars_read_str 9793
matchQ 0
matindex_type 5306
op_insert_loc 1477
op_push 26022359
op_push_loc 26588160
optimizecall 13447
optimizefunc 2339000
optimizemat 6048
optimizematcoeff 4984
optimizenode 13791189
optimizeseq 5590
optimizevec 3499189
pack_localvars 35
pari_close_compiler 1231
pari_init_compiler 1243
pari_translate_string 0
parseproto 6320375
push_frame 175
snm_closure 0
str_defproto 35
strntoGENexp 1031777
strtoclosure 7
strtofunction 0
translate 1031777
var_push 43392
vec_optimize 3556204

Generated by: LCOV version 1.9