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 19828-fe528f7) Lines: 1323 1490 88.8 %
Date: 2016-12-07 05:49:12 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 30100
checkdups 12910
closure_deriv 49
closurefunc 7834
compilecall 16397
compilecast 5365696
compilecast_loc 5394774
compilefunc 2631197
compilefuncinline 14305
compilelambda 22
compilelocal 7
compilelvalue 959
compilemat 7133
compilematcoeff 6339
compilemy 1657
compilenewptr 448
compilenode 13184992
compileseq 7341
compilesmall 6751901
compilestate_reset 168
compilestate_restore 30224
compilestate_save 1317418
compilestore 21626
compileuninline 4
compilevec 3791930
copyifclone 142943
countlisttogen 12975330
countvar 1664
ctxmvar 6792
data_push 1785380
debug_context 0
detag 226067
fetch_member_raw 20384
first_safe_arg 5299724
frame_push 44636
genclosure 35798
genclosurectx 27955
get_ret_type 3325455
getclosure 14339
getcodepos 131858
getentry 193507
getfunc 5476620
getfunction 131851
getlvalue 23215
getmvar 190172
getvar 42730
gp_closure 81600
is_func_named 21037669
is_node_zero 2121
listtogen 12975211
localpush 42
localvars_find 7
localvars_read_str 10108
matchQ 0
matindex_type 7410
op_insert_loc 1638
op_push 28488698
op_push_loc 29382736
optimizecall 16404
optimizefunc 2626269
optimizemat 7133
optimizematcoeff 6836
optimizenode 15214175
optimizeseq 7334
optimizevec 3792252
pack_localvars 35
pari_close_compiler 64412
pari_init_compiler 63984
pari_translate_string 0
parseproto 7850162
push_frame 210
snm_closure 2208
str_defproto 7
strntoGENexp 1107902
strtoclosure 25756
strtofunction 7
translate 1107902
var_push 50596
vec_optimize 3860989

Generated by: LCOV version 1.11