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-bordeaux1.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 17406-57895db) Lines: 1278 1441 88.7 %
Date: 2015-01-31 Functions: 75 79 94.9 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 702 886 79.2 %

Function Name Sort by function name Hit count Sort by hit count
cattovec 22332
checkdups 7863
closure_deriv 7
closurefunc 4327
compilecall 13903
compilecast 4708850
compilecast_loc 4709915
compilefunc 2345838
compilefuncinline 8740
compilelambda 18
compilelocal 7
compilelvalue 595
compilemat 6258
compilematcoeff 4762
compilemy 1058
compilenewptr 280
compilenode 11938882
compileseq 5697
compilesmall 6221058
compilestate_reset 119
compilestate_restore 21191
compilestate_save 1289273
compilestore 16190
compileuninline 12
compilevec 3499533
copyifclone 109437
countlisttogen 11805845
countvar 1065
ctxmvar 5716
data_push 1545734
debug_context 0
detag 167758
fetch_member_raw 18823
first_safe_arg 4722954
frame_push 11560
genclosure 4388
genclosurectx 55
get_ret_type 2870377
getclosure 8778
getcodepos 72880
getentry 144143
getfunc 4858239
getfunction 72873
getlvalue 17268
getmvar 144753
getvar 30379
gp_closure 57314
is_func_named 18759171
is_node_zero 1494
listtogen 11805775
localpush 42
localvars_find 7
localvars_read_str 9793
matchQ 0
matindex_type 5413
op_insert_loc 1617
op_push 26042237
op_push_loc 26614600
optimizecall 13910
optimizefunc 2344132
optimizemat 6258
optimizematcoeff 5077
optimizenode 13808954
optimizeseq 5697
optimizevec 3499729
pack_localvars 35
pari_close_compiler 1259
pari_init_compiler 1553
pari_translate_string 0
parseproto 6351283
push_frame 175
snm_closure 36
str_defproto 35
strntoGENexp 1032256
strtoclosure 25
strtofunction 0
translate 1032256
var_push 43670
vec_optimize 3558145

Generated by: LCOV version 1.9