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.1 lcov report (development 22708-0f0e6fe44) Lines: 1343 1493 90.0 %
Date: 2018-06-18 05:36:21 Functions: 79 80 98.8 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
debug_context 0
compileuninline 4
pari_translate_string 4
compilelocal 7
localvars_find 7
str_defproto 7
strtofunction 7
matchQ 8
call0 21
compilelambda 22
localpush 42
pack_localvars 42
closure_deriv 70
push_frame 231
compilestate_reset 277
compilenewptr 553
compilelvalue 1204
op_insert_loc 1764
compilemy 2182
countvar 2189
is_node_zero 2695
closurefunc 7067
ctxmvar 7590
compilemat 8449
optimizemat 8449
compilematcoeff 9342
optimizematcoeff 9993
compileseq 10243
optimizeseq 10243
matindex_type 10714
localvars_read_str 10738
checkdups 14355
compilefuncinline 14909
getclosure 14964
snm_closure 18739
compilecall 18847
optimizecall 18854
fetch_member_raw 22274
compilestore 29256
getlvalue 31307
cattovec 35628
compilestate_restore 43181
getvar 54257
var_push 55107
gp_closure 93831
pari_close_compiler 110424
pari_init_compiler 112929
addcopy 181006
strtoclosure 217090
genclosurectx 235820
getmvar 237961
getentry 242330
genclosure 242896
frame_push 253967
detag 286111
getfunction 353720
getcodepos 353734
strntoGENexp 1107921
translate 1107925
compilestate_save 1366785
data_push 1947543
optimizefunc 2781709
compilefunc 2784603
get_ret_type 3805236
compilevec 3835207
optimizevec 3835907
vec_optimize 3914842
first_safe_arg 5612402
compilecast 5736015
getfunc 5840187
compilecast_loc 5973294
compilesmall 6860756
parseproto 10892893
listtogen 13393285
countlisttogen 13393523
compilenode 13672336
optimizenode 15756576
is_func_named 25041819
op_push 29223437
op_push_loc 31050033

Generated by: LCOV version 1.13