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 - eval.c (source / functions) Hit Total Coverage
Test: PARI/GP v2.8.0 lcov report (development 18948-dd2a64a) Lines: 1010 1386 72.9 %
Date: 2016-05-27 Functions: 90 110 81.8 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 511 876 58.3 %

Function Name Sort by function name Hit count Sort by hit count
bincopy_relink 0
break0 70200
change_compo 8199198
changelex 108559071
changevalue 5782028
check_array_index 46920549
checkvalue 77596619
checkvalueptr 499779
closure_callgen1 58760
closure_callgen1prec 10798
closure_callgen2 103782
closure_callgenall 4
closure_callgenvec 397093
closure_callgenvecprec 91
closure_callvoid1 0
closure_castgen 38677573
closure_castlong 651
closure_context 56
closure_disassemble 0
closure_err 57966
closure_eval 153752808
closure_evalbrk 105
closure_evalgen 17133858
closure_evalnobrk 32848674
closure_evalres 134860
closure_evalvoid 71949014
closure_func_err 58316
closure_relink 0
closure_return 31916431
closure_returnupto 570341
closure_trapgen 21
closure_unlink 0
closure_varn 144878
copybin_unlink 0
copylex 8247428
copyupto 21525279
copyvalue 737716
disassemble_cast 0
err_var 0
evalstate_clone 0
evalstate_reset 161
evalstate_restore 73029
evalstate_restore_err 15014
evalstate_save 1376204
freeep 23044
freelex 91205614
gen_relink 0
gen_unlink 0
get_arg_name 14
get_lex 43494633
get_localbitprec 20403194
get_localprec 20391909
get_next_label 140
gp_call 4620
gp_call2 91
gp_callbool 46634
gp_callprec 3290
gp_callvoid 0
gp_eval 7577096
gp_evalbool 166971
gp_evalprec 1925
gp_evalupto 630630
gp_evalvoid 3651473
gp_evalvoid2 2445
hash_from_link 0
localbitprec 21
localprec 7931
loop_break 65663446
lvar_make_safe 0
new_ptr 36495016
new_val_cell 9674
next0 65436
opcode_need_relink 0
pareval 2
pareval_worker 4
parfor 46
parfor0 46
parfor_worker 2872
parforprime 2
parforprime0 2
parforvec 6
parforvec0 6
pari_close_evaluator 1836
pari_init_evaluator 193399
pari_self 35
parsum 0
parvector 4
parvector_worker 171
pop_lex 4062737
pop_localprec 13647
pop_val 9597
pop_val_if_newer 246774
ptr_proplock 8199422
push_lex 4067251
push_localbitprec 21
push_localprec 21578
pushlex 54651441
pushvalue 28
reset_break 74325
restore_trace 73029
restore_vars 153942910
return0 381
safeel 0
safegcoeff 0
safegel 0
safelistel 0
set_lex 26055477
st_alloc 1666002916
trace_push 157724188
zerovalue 14

Generated by: LCOV version 1.9