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 21947-4fc3047) Lines: 1343 1493 90.0 %
Date: 2018-02-24 06:16:21 Functions: 77 80 96.2 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
addcopy 167635
call0 21
cattovec 34662
checkdups 14012
closure_deriv 70
closurefunc 6930
compilecall 18674
compilecast 5436864
compilecast_loc 5666576
compilefunc 2685449
compilefuncinline 14573
compilelambda 66
compilelocal 7
compilelvalue 1092
compilemat 8064
compilematcoeff 8837
compilemy 2171
compilenewptr 504
compilenode 13334358
compileseq 9913
compilesmall 6820139
compilestate_reset 270
compilestate_restore 42892
compilestate_save 1360814
compilestore 27445
compileuninline 12
compilevec 3803354
countlisttogen 13126295
countvar 2178
ctxmvar 7535
data_push 1788547
debug_context 0
detag 267730
fetch_member_raw 22057
first_safe_arg 5413384
frame_push 246102
genclosure 235168
genclosurectx 228225
get_ret_type 3608204
getclosure 14570
getcodepos 340639
getentry 226257
getfunc 5625628
getfunction 340625
getlvalue 29377
getmvar 222350
getvar 51692
gp_closure 88752
is_func_named 24149712
is_node_zero 2611
listtogen 13126057
localpush 42
localvars_find 7
localvars_read_str 10738
matchQ 0
matindex_type 10083
op_insert_loc 1680
op_push 28712889
op_push_loc 30416030
optimizecall 18681
optimizefunc 2682562
optimizemat 8064
optimizematcoeff 9425
optimizenode 15405334
optimizeseq 9913
optimizevec 3804033
pack_localvars 35
pari_close_compiler 90352
pari_init_compiler 90341
pari_translate_string 0
parseproto 10376450
push_frame 231
snm_closure 18825
str_defproto 39
strntoGENexp 1107320
strtoclosure 209413
strtofunction 7
translate 1107320
var_push 54529
vec_optimize 3880569

Generated by: LCOV version 1.11