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.8.0 lcov report (development 19081-e84bc4a) Lines: 1298 1456 89.1 %
Date: 2016-07-01 Functions: 77 80 96.2 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 705 894 78.9 %

Function Name Sort by function name Hit count Sort by hit count
call0 21
cattovec 33796
checkdups 33715
closure_deriv 49
closurefunc 11775
compilecall 15949
compilecast 5318194
compilecast_loc 5423894
compilefunc 2675413
compilefuncinline 35138
compilelambda 20
compilelocal 7
compilelvalue 931
compilemat 7070
compilematcoeff 8133
compilemy 1601
compilenewptr 434
compilenode 13241017
compileseq 14055
compilesmall 6900868
compilestate_reset 161
compilestate_restore 73064
compilestate_save 1376973
compilestore 21676
compileuninline 4
compilevec 3772304
copyifclone 169257
countlisttogen 13031141
countvar 1608
ctxmvar 6671
data_push 1649478
debug_context 0
detag 286754
fetch_member_raw 19866
first_safe_arg 5387120
frame_push 142012
genclosure 116340
genclosurectx 104556
get_ret_type 3495435
getclosure 35174
getcodepos 283168
getentry 254438
getfunc 5617163
getfunction 283161
getlvalue 23188
getmvar 219945
getvar 73406
gp_closure 135574
is_func_named 21413035
is_node_zero 2079
listtogen 13031022
localpush 42
localvars_find 7
localvars_read_str 10108
matchQ 0
matindex_type 9176
op_insert_loc 1631
op_push 28376839
op_push_loc 29729432
optimizecall 15956
optimizefunc 2666495
optimizemat 7070
optimizematcoeff 8616
optimizenode 15272009
optimizeseq 14048
optimizevec 3772598
pack_localvars 35
pari_close_compiler 194904
pari_init_compiler 194143
pari_translate_string 0
parseproto 9557386
push_frame 175
snm_closure 613
str_defproto 35
strntoGENexp 1112525
strtoclosure 103952
strtofunction 7
translate 1112525
var_push 71324
vec_optimize 3842820

Generated by: LCOV version 1.9