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 22344-f2bf0a3) Lines: 1343 1493 90.0 %
Date: 2018-04-25 06:16:49 Functions: 77 80 96.2 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
addcopy 170725
call0 21
cattovec 35310
checkdups 14457
closure_deriv 70
closurefunc 7028
compilecall 18807
compilecast 5709011
compilecast_loc 5937948
compilefunc 2772332
compilefuncinline 14982
compilelambda 66
compilelocal 7
compilelvalue 1204
compilemat 8190
compilematcoeff 9061
compilemy 2272
compilenewptr 553
compilenode 13636281
compileseq 10244
compilesmall 6849581
compilestate_reset 270
compilestate_restore 43093
compilestate_save 1362436
compilestore 28048
compileuninline 12
compilevec 3833979
countlisttogen 13364122
countvar 2279
ctxmvar 7612
data_push 1947419
debug_context 0
detag 273821
fetch_member_raw 22127
first_safe_arg 5587654
frame_push 245779
genclosure 234491
genclosurectx 227450
get_ret_type 3773108
getclosure 14986
getcodepos 342076
getentry 230916
getfunc 5804228
getfunction 342062
getlvalue 30072
getmvar 226366
getvar 53163
gp_closure 90471
is_func_named 24931135
is_node_zero 2783
listtogen 13363884
localpush 42
localvars_find 7
localvars_read_str 10782
matchQ 0
matindex_type 10433
op_insert_loc 1680
op_push 29184446
op_push_loc 30963689
optimizecall 18814
optimizefunc 2769452
optimizemat 8190
optimizematcoeff 9712
optimizenode 15717520
optimizeseq 10244
optimizevec 3834665
pack_localvars 46
pari_close_compiler 90484
pari_init_compiler 90591
pari_translate_string 0
parseproto 10706439
push_frame 231
snm_closure 18823
str_defproto 67
strntoGENexp 1107785
strtoclosure 208640
strtofunction 7
translate 1107785
var_push 55483
vec_optimize 3912592

Generated by: LCOV version 1.11