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.10.0 lcov report (development 20296-0a10b35) Lines: 1035 1392 74.4 %
Date: 2017-02-26 05:50:47 Functions: 91 110 82.7 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
bincopy_relink 0
break0 70228
change_compo 8391278
changelex 116230556
changevalue 5956258
check_array_index 51173623
checkvalue 84846345
checkvalueptr 499849
closure_callgen1 81013
closure_callgen1prec 64145
closure_callgen2 76559
closure_callgenall 4
closure_callgenvec 307130
closure_callgenvecprec 105
closure_callvoid1 0
closure_castgen 42625528
closure_castlong 658
closure_context 84
closure_disassemble 0
closure_err 16407
closure_eval 152314990
closure_evalbrk 161
closure_evalgen 10041072
closure_evalnobrk 31902986
closure_evalres 84594
closure_evalvoid 75810352
closure_func_err 16820
closure_relink 0
closure_return 34677041
closure_returnupto 528120
closure_trapgen 35
closure_unlink 0
closure_varn 795270
copybin_unlink 0
copylex 8437681
copyupto 14308075
copyvalue 740467
disassemble_cast 0
err_var 0
evalstate_clone 0
evalstate_reset 217
evalstate_restore 31008
evalstate_restore_err 14538
evalstate_save 1321226
freeep 24584
freelex 98615470
gen_relink 0
gen_unlink 0
get_arg_name 14
get_lex 45857765
get_localbitprec 14069022
get_localprec 14056940
get_next_label 161
gp_call 8330
gp_call2 91
gp_callbool 45682
gp_callprec 3290
gp_callvoid 0
gp_eval 7514385
gp_evalbool 166887
gp_evalprec 18963
gp_evalupto 501683
gp_evalvoid 3654651
gp_evalvoid2 2461
hash_from_link 0
localbitprec 63
localprec 7952
loop_break 69578581
lvar_make_safe 0
new_ptr 36677254
new_val_cell 10381
next0 17570
opcode_need_relink 0
pareval 2
pareval_worker 4
parfor 46
parfor0 46
parfor_worker 2885
parforprime 2
parforprime0 2
parforvec 6
parforvec0 6
pari_close_evaluator 64581
pari_init_evaluator 64049
pari_self 35
parsum 2
parvector 4
parvector_worker 19691
pop_lex 4414442
pop_localprec 83885
pop_val 10283
pop_val_if_newer 177004
ptr_proplock 8391502
push_lex 4419718
push_localbitprec 63
push_localprec 91844
pushlex 59847212
pushvalue 28
reset_break 32374
restore_trace 31008
restore_vars 152519850
return0 380
safeel 0
safegcoeff 0
safegel 0
safelistel 0
set_lex 16190811
st_alloc 1697597502
trace_push 156603644
zerovalue 14

Generated by: LCOV version 1.11