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 20459-9710128) Lines: 1327 1489 89.1 %
Date: 2017-03-30 05:32:39 Functions: 77 80 96.2 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
call0 18
cattovec 25956
checkdups 10184
closure_deriv 48
closurefunc 5380
compilecall 14580
compilecast 4575920
compilecast_loc 4600428
compilefunc 2269184
compilefuncinline 10524
compilelambda 22
compilelocal 6
compilelvalue 834
compilemat 6234
compilematcoeff 5760
compilemy 1562
compilenewptr 390
compilenode 11329526
compileseq 6646
compilesmall 5829034
compilestate_reset 178
compilestate_restore 19328
compilestate_save 1123931
compilestore 19494
compileuninline 4
compilevec 3256140
copyifclone 125086
countlisttogen 11166080
countvar 1568
ctxmvar 5918
data_push 1515736
debug_context 0
detag 197052
fetch_member_raw 17658
first_safe_arg 4571464
frame_push 36738
genclosure 28716
genclosurectx 23328
get_ret_type 2852402
getclosure 10550
getcodepos 106680
getentry 167576
getfunc 4728062
getfunction 106668
getlvalue 20870
getmvar 165694
getvar 37110
gp_closure 65656
is_func_named 18142852
is_node_zero 1898
listtogen 11165930
localpush 36
localvars_find 6
localvars_read_str 8664
matchQ 0
matindex_type 6690
op_insert_loc 1428
op_push 24507372
op_push_loc 25255266
optimizecall 14586
optimizefunc 2266794
optimizemat 6234
optimizematcoeff 6204
optimizenode 13095672
optimizeseq 6646
optimizevec 3256482
pack_localvars 30
pari_close_compiler 64060
pari_init_compiler 64007
pari_translate_string 0
parseproto 6689376
push_frame 198
snm_closure 1898
str_defproto 6
strntoGENexp 948180
strtoclosure 21438
strtofunction 6
translate 948180
var_push 42654
vec_optimize 3316554

Generated by: LCOV version 1.11