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 to exceed 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.12.0 lcov report (development 23008-54b2e2f01) Lines: 1349 1496 90.2 %
Date: 2018-09-20 05:37:46 Functions: 79 80 98.8 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
debug_context 0
compileuninline 4
pari_translate_string 4
compilelocal 7
localvars_find 7
str_defproto 7
strtofunction 7
matchQ 8
call0 21
compilelambda 22
localpush 42
pack_localvars 42
closure_deriv 70
push_frame 231
compilestate_reset 284
compilenewptr 553
compilelvalue 1204
op_insert_loc 1764
compilemy 2189
countvar 2196
is_node_zero 2695
closurefunc 7522
ctxmvar 7618
compilemat 8484
optimizemat 8484
compilematcoeff 9405
optimizematcoeff 10056
compileseq 10334
optimizeseq 10334
localvars_read_str 10738
matindex_type 10777
checkdups 14432
compilefuncinline 14965
getclosure 15020
compilecall 18938
optimizecall 18945
snm_closure 19143
fetch_member_raw 22288
compilestore 29585
getlvalue 31636
cattovec 35922
compilestate_restore 43328
getvar 54726
var_push 55226
gp_closure 95000
pari_close_compiler 111445
pari_init_compiler 113748
addcopy 182350
strtoclosure 217307
genclosurectx 236441
getmvar 240180
genclosure 243972
getentry 244598
frame_push 254665
detag 288750
getfunction 355587
getcodepos 355608
strntoGENexp 1108026
translate 1108030
compilestate_save 1368125
data_push 1948327
optimizefunc 2787197
compilefunc 2790525
get_ret_type 3817001
compilevec 3836782
optimizevec 3837489
vec_optimize 3916823
first_safe_arg 5624470
compilecast 5745423
getfunc 5853592
compilecast_loc 5983323
compilesmall 6867238
parseproto 10934540
listtogen 13408559
countlisttogen 13408804
compilenode 13688275
optimizenode 15773817
is_func_named 25094669
op_push 29243142
op_push_loc 31078543

Generated by: LCOV version 1.13