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-bordeaux.fr machine (x86_64 architecture), and agregate them in the final report:

The target is to exceed 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.12.0 lcov report (development 23348-5caea72e3) Lines: 1378 1529 90.1 %
Date: 2018-12-14 05:41:32 Functions: 81 82 98.8 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
debug_context 0
compileexport 2
compileunexport 2
compileuninline 2
pari_translate_string 4
compilelocal 7
localvars_find 7
str_defproto 7
strtofunction 7
matchQ 8
call0 21
compilelambda 24
localpush 42
pack_localvars 42
closure_deriv 70
push_frame 231
compilestate_reset 291
compilenewptr 595
compilelvalue 1288
op_insert_loc 1764
compilemy 2285
countvar 2292
is_node_zero 2807
ctxmvar 7748
closurefunc 7753
compilemat 8491
optimizemat 8491
compilematcoeff 9503
optimizematcoeff 10196
compileseq 10565
optimizeseq 10565
localvars_read_str 10738
matindex_type 10959
checkdups 14833
compilefuncinline 15254
getclosure 15307
compilecall 19199
optimizecall 19206
snm_closure 19410
fetch_member_raw 22316
compilestore 30021
getlvalue 32156
cattovec 36608
compilestate_restore 43559
var_push 55760
getvar 55819
gp_closure 96537
pari_close_compiler 116736
pari_init_compiler 119066
addcopy 185273
strtoclosure 231047
getmvar 244108
getentry 248845
genclosurectx 250445
genclosure 258208
frame_push 269079
detag 294137
getfunction 371578
getcodepos 371601
strntoGENexp 1108173
translate 1108177
compilestate_save 1369894
data_push 1949230
optimizefunc 2793623
compilefunc 2797098
compilevec 3837230
optimizevec 3837972
get_ret_type 3843887
vec_optimize 3918064
first_safe_arg 5638208
compilecast 5757655
getfunc 5871157
compilecast_loc 6009599
compilesmall 6871898
parseproto 11198035
listtogen 13423741
countlisttogen 13424014
compilenode 13704591
optimizenode 15791791
op_push 29258041
is_func_named 30735265
op_push_loc 31175841

Generated by: LCOV version 1.13