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 16962-5a32637) Lines: 1221 1423 85.8 %
Date: 2014-10-29 Functions: 71 78 91.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 665 875 76.0 %

Function Name Sort by function name Hit count Sort by hit count
cattovec 18788
checkdups 6712
closure_deriv 7
closurefunc 4212
compilecall 8974
compilecast 4635785
compilecast_loc 4636744
compilefunc 2314680
compilefuncinline 7374
compilelambda 0
compilelocal 7
compilelvalue 483
compilemat 5642
compilematcoeff 2884
compilemy 756
compilenewptr 231
compilenode 11835940
compileseq 5107
compilesmall 6197101
compilestate_reset 105
compilestate_restore 20662
compilestate_save 1278870
compilestore 12117
compileuninline 0
compileuserfunc 8806
compilevec 3496627
copyifclone 84030
countlisttogen 11717502
countvar 763
ctxmvar 1582
data_push 1534331
debug_context 0
detag 129123
first_safe_arg 4641806
frame_push 6733
genclosure 4219
get_ret_type 2811465
getclosure 7430
getcodepos 62246
getentry 111714
getfunc 4753790
getfunction 62239
getlvalue 13048
getmvar 110096
getvar 23472
gp_closure 52268
is_func_named 18511766
is_node_zero 1029
listtogen 11717432
localpush 42
localvars_find 7
localvars_read_str 9793
matchQ 0
matindex_type 3409
op_insert_loc 1477
op_push 25926921
op_push_loc 26460730
optimizecall 8981
optimizefunc 2313037
optimizemat 5642
optimizematcoeff 3136
optimizenode 13688116
optimizeseq 5107
optimizevec 3496767
pack_localvars 35
pari_close_compiler 1189
pari_init_compiler 1201
pari_translate_string 0
parseproto 6172965
push_frame 175
snm_closure 0
str_defproto 35
strntoGENexp 1026737
strtoclosure 7
strtofunction 0
translate 1026737
var_push 41215
vec_optimize 3546201

Generated by: LCOV version 1.9