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 21353-12523aa) Lines: 1343 1493 90.0 %
Date: 2017-11-24 06:20:58 Functions: 77 80 96.2 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
debug_context 0
matchQ 0
pari_translate_string 0
compilelocal 7
localvars_find 7
strtofunction 7
compileuninline 12
call0 21
pack_localvars 35
str_defproto 39
localpush 42
closure_deriv 56
compilelambda 66
push_frame 231
compilestate_reset 263
compilenewptr 490
compilelvalue 1043
op_insert_loc 1673
compilemy 2115
countvar 2122
is_node_zero 2583
closurefunc 6706
ctxmvar 7388
compilemat 7756
optimizemat 7756
compilematcoeff 8438
optimizematcoeff 8991
compileseq 9479
optimizeseq 9479
matindex_type 9593
localvars_read_str 10108
checkdups 13564
getclosure 14157
compilefuncinline 14160
snm_closure 16211
compilecall 18261
optimizecall 18268
fetch_member_raw 20741
compilestore 26444
getlvalue 28299
cattovec 33926
compilestate_restore 41954
getvar 49963
var_push 52086
gp_closure 85084
pari_close_compiler 92705
pari_init_compiler 92923
addcopy 162350
strtoclosure 199068
genclosurectx 215266
getmvar 215357
getentry 219019
genclosure 221985
frame_push 232688
detag 259071
getfunction 323403
getcodepos 323417
strntoGENexp 1107001
translate 1107001
compilestate_save 1356502
data_push 1787368
optimizefunc 2672844
compilefunc 2675626
get_ret_type 3576516
compilevec 3802431
optimizevec 3803040
vec_optimize 3878060
first_safe_arg 5392716
compilecast 5417972
getfunc 5598240
compilecast_loc 5634704
compilesmall 6811684
parseproto 10174549
listtogen 13100869
countlisttogen 13101079
compilenode 13307517
optimizenode 15374671
is_func_named 24061823
op_push 28684348
op_push_loc 30328612

Generated by: LCOV version 1.11