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 16741-1378b1c) Lines: 1225 1413 86.7 %
Date: 2014-08-17 Functions: 70 75 93.3 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 670 873 76.7 %

Function Name Sort by function name Hit count Sort by hit count
cattovec 13698
checkdups 5145
closure_deriv 10
closurefunc 3257
compilecall 4475
compilecast 3338733
compilecast_loc 3339458
compilefunc 1666789
compilefuncinline 5647
compilelambda 0
compilelocal 5
compilelvalue 335
compilemat 4200
compilematcoeff 2066
compilemy 540
compilenewptr 160
compilenode 8481666
compileseq 3817
compilesmall 4430248
compilestate_reset 75
compilestate_restore 12980
compilestate_save 914161
compilestore 8778
compileuninline 0
compileuserfunc 4350
compilevec 2497899
copyifclone 65269
countlisttogen 8394548
countvar 545
ctxmvar 1135
data_push 1100504
debug_context 0
detag 98542
first_safe_arg 3340573
frame_push 5160
genclosure 3297
get_ret_type 2037430
getclosure 5687
getcodepos 45502
getentry 86034
getfunc 3424343
getfunction 45497
getlvalue 9418
getmvar 82294
getvar 17508
gp_closure 37945
is_func_named 13338677
is_node_zero 735
listtogen 8394498
localpush 30
localvars_find 10
localvars_read_str 6995
matindex_type 2431
op_insert_loc 1770
op_push 18529202
op_push_loc 18928281
optimizecall 4480
optimizefunc 1665387
optimizemat 4200
optimizematcoeff 2241
optimizenode 9800400
optimizeseq 3817
optimizevec 2497984
pack_localvars 30
pari_close_compiler 850
pari_init_compiler 862
parseproto 4501816
push_frame 125
snm_closure 0
str_defproto 160
strntoGENexp 733560
strtoclosure 40
strtofunction 0
var_push 29845
vec_optimize 2531901

Generated by: LCOV version 1.9