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 17846-16c9112) Lines: 1283 1442 89.0 %
Date: 2015-05-27 Functions: 75 79 94.9 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 699 886 78.9 %

Function Name Sort by function name Hit count Sort by hit count
cattovec 31920
checkdups 32258
closure_deriv 49
closurefunc 11337
compilecall 14696
compilecast 5011944
compilecast_loc 5013084
compilefunc 2520152
compilefuncinline 34039
compilelambda 8
compilelocal 7
compilelvalue 847
compilemat 6909
compilematcoeff 7496
compilemy 1253
compilenewptr 385
compilenode 12410551
compileseq 13138
compilesmall 6446459
compilestate_reset 133
compilestate_restore 72525
compilestate_save 1368211
compilestore 18729
compileuninline 4
compilevec 3515554
copyifclone 155098
countlisttogen 12200515
countvar 1260
ctxmvar 6113
data_push 1575205
debug_context 0
detag 261721
fetch_member_raw 18865
first_safe_arg 5073448
frame_push 35962
genclosure 11405
genclosurectx 66
get_ret_type 3210699
getclosure 34087
getcodepos 169748
getentry 234284
getfunc 5284745
getfunction 169741
getlvalue 20026
getmvar 200933
getvar 67849
gp_closure 128359
is_func_named 20173384
is_node_zero 1704
listtogen 12200445
localpush 42
localvars_find 7
localvars_read_str 9793
matchQ 0
matindex_type 8483
op_insert_loc 1624
op_push 26533046
op_push_loc 27328303
optimizecall 14703
optimizefunc 2511623
optimizemat 6909
optimizematcoeff 7958
optimizenode 14305085
optimizeseq 13138
optimizevec 3515736
pack_localvars 35
pari_close_compiler 1780
pari_init_compiler 3138
pari_translate_string 0
parseproto 7556493
push_frame 175
snm_closure 48
str_defproto 63
strntoGENexp 1040243
strtoclosure 20
strtofunction 0
translate 1040243
var_push 68262
vec_optimize 3582411

Generated by: LCOV version 1.9