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 18948-dd2a64a) Lines: 1298 1456 89.1 %
Date: 2016-05-28 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 33698
checkdups 33561
closure_deriv 49
closurefunc 11754
compilecall 15669
compilecast 5314930
compilecast_loc 5420571
compilefunc 2674125
compilefuncinline 35068
compilelambda 20
compilelocal 7
compilelvalue 903
compilemat 7070
compilematcoeff 8091
compilemy 1538
compilenewptr 420
compilenode 13235851
compileseq 13971
compilesmall 6899043
compilestate_reset 161
compilestate_restore 73029
compilestate_save 1376202
compilestore 21389
compileuninline 4
compilevec 3772129
copyifclone 168144
countlisttogen 13027179
countvar 1545
ctxmvar 6608
data_push 1649217
debug_context 0
detag 284444
fetch_member_raw 19852
first_safe_arg 5383900
frame_push 141771
genclosure 116260
genclosurectx 104497
get_ret_type 3493010
getclosure 35104
getcodepos 282374
getentry 252702
getfunc 5612291
getfunction 282367
getlvalue 22880
getmvar 218223
getvar 72804
gp_closure 134972
is_func_named 21403095
is_node_zero 2016
listtogen 13027067
localpush 42
localvars_find 7
localvars_read_str 10108
matchQ 0
matindex_type 9106
op_insert_loc 1624
op_push 28370602
op_push_loc 29721479
optimizecall 15676
optimizefunc 2665186
optimizemat 7070
optimizematcoeff 8560
optimizenode 15265730
optimizeseq 13964
optimizevec 3772402
pack_localvars 35
pari_close_compiler 1836
pari_init_compiler 194694
pari_translate_string 0
parseproto 9548892
push_frame 175
snm_closure 613
str_defproto 35
strntoGENexp 1112420
strtoclosure 103893
strtofunction 7
translate 1112420
var_push 71037
vec_optimize 3842190

Generated by: LCOV version 1.9