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 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.10.0 lcov report (development 20107-077ab02) Lines: 1327 1489 89.1 %
Date: 2017-01-22 05:49:17 Functions: 77 80 96.2 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
call0 21
cattovec 31640
checkdups 13547
closure_deriv 56
closurefunc 8044
compilecall 16866
compilecast 5377379
compilecast_loc 5406529
compilefunc 2637392
compilefuncinline 15026
compilelambda 22
compilelocal 7
compilelvalue 945
compilemat 7245
compilematcoeff 6563
compilemy 1692
compilenewptr 441
compilenode 13201883
compileseq 7656
compilesmall 6756864
compilestate_reset 182
compilestate_restore 30973
compilestate_save 1320731
compilestore 22298
compileuninline 4
compilevec 3792462
copyifclone 146156
countlisttogen 12991206
countvar 1699
ctxmvar 6855
data_push 1786605
debug_context 0
detag 231723
fetch_member_raw 20356
first_safe_arg 5313108
frame_push 45268
genclosure 36017
genclosurectx 27964
get_ret_type 3337574
getclosure 15060
getcodepos 135150
getentry 198470
getfunc 5494554
getfunction 135136
getlvalue 23880
getmvar 194687
getvar 44270
gp_closure 84029
is_func_named 21087019
is_node_zero 2114
listtogen 12991073
localpush 42
localvars_find 7
localvars_read_str 10108
matchQ 0
matindex_type 7620
op_insert_loc 1638
op_push 28507416
op_push_loc 29409920
optimizecall 16873
optimizefunc 2632345
optimizemat 7245
optimizematcoeff 7053
optimizenode 15233194
optimizeseq 7649
optimizevec 3792798
pack_localvars 35
pari_close_compiler 64511
pari_init_compiler 64011
pari_translate_string 0
parseproto 7888986
push_frame 231
snm_closure 2208
str_defproto 7
strntoGENexp 1108168
strtoclosure 25765
strtofunction 7
translate 1108168
var_push 51268
vec_optimize 3863208

Generated by: LCOV version 1.11