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.16.1 lcov report (development 28676-df828f1c94) Lines: 1594 1751 91.0 %
Date: 2023-08-26 07:54:43 Functions: 88 90 97.8 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
closure_deriv 0
debug_context 0
pari_translate_string 4
compileunexport 6
compileuninline 6
L_compile_err 7
U_compile_err 7
localvars_find 7
matchQ 8
call0 21
compilelocal 28
compileexport 41
pack_localvars 53
localpush 70
str_defproto 91
closure_derivn 105
strtofunction 119
getvardyn 131
push_frame 259
compilelambda 300
countmatrixelts 357
compilestate_reset 385
compilenewptr 805
compilelvalue 1764
strtoclosure 1820
op_insert_loc 2954
compilemy 3031
countvar 3059
is_node_zero 3833
ctxmvar 9154
compilemat 9401
optimizemat 9401
closurefunc 9852
localvars_read_str 10789
compilematcoeff 12196
optimizematcoeff 13155
compileseq 13794
optimizeseq 13794
matindex_type 14240
getclosure 18848
checkdups 19019
compilefuncinline 19064
compilecall 22234
optimizecall 22241
fetch_member_raw 23807
compilestore 40010
getlvalue 43175
cattovec 44368
compilestate_restore 46966
var_push 61791
getvar 73836
access_push 104655
addcopy 246260
pari_close_compiler 314182
pari_init_compiler 315951
getentry 330079
detag 391052
strntoGENexp 764065
translate 764069
gp_closure 925073
compilestate_save 1407738
data_push 1639262
compilevec 4049255
optimizevec 4050316
vec_optimize 4142169
optimizefunc 4425964
compilefunc 4430679
getmvar 4765631
snm_closure 5812881
genclosurectx 5814545
genclosure 5824547
genctx 5828800
frame_push 5837640
compilecast 6212587
getfunction 6769514
getcodepos 6769546
gcopyunclone 7476910
first_safe_arg 8912728
getfunc 9222387
compilesmall 10392404
get_ret_type 11150641
compilecast_loc 12028963
countlisttogen 17136108
listtogen 17136108
compilenode 17314793
optimizenode 20953547
op_push 35579752
is_func_named 48694445
op_push_loc 63879002
parseproto 93686887

Generated by: LCOV version 1.14