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 20704-afbaa81) Lines: 1059 1392 76.1 %
Date: 2017-05-26 05:56:59 Functions: 93 110 84.5 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
bincopy_relink 0
break0 70288
change_compo 8391453
changelex 144319850
changevalue 19961813
check_array_index 80206114
checkvalue 99524270
checkvalueptr 14499856
closure_callgen1 96214
closure_callgen1prec 64145
closure_callgen2 76559
closure_callgenall 12
closure_callgenvec 384556
closure_callgenvecprec 105
closure_callvoid1 0
closure_castgen 71639899
closure_castlong 658
closure_context 84
closure_disassemble 0
closure_err 7720
closure_eval 213126174
closure_evalbrk 161
closure_evalgen 23559742
closure_evalnobrk 32092073
closure_evalres 78210
closure_evalvoid 122797215
closure_func_err 8130
closure_relink 0
closure_return 34768728
closure_returnupto 620586
closure_trapgen 35
closure_unlink 0
closure_varn 996520
copybin_unlink 8
copylex 8437681
copyupto 14396471
copyvalue 740642
disassemble_cast 0
err_var 0
evalstate_clone 0
evalstate_reset 207
evalstate_restore 22389
evalstate_restore_err 14606
evalstate_save 1313491
freeep 23291
freelex 126741402
gen_relink 0
gen_unlink 12
get_arg_name 14
get_lex 78798577
get_localbitprec 14143113
get_localprec 14127958
get_next_label 161
gp_call 17983
gp_call2 91
gp_callbool 672
gp_callprec 3290
gp_callvoid 0
gp_eval 7550668
gp_evalbool 166887
gp_evalprec 19040
gp_evalupto 501683
gp_evalvoid 3654644
gp_evalvoid2 4037
hash_from_link 0
localbitprec 77
localprec 7952
loop_break 116559215
lvar_make_safe 0
new_ptr 50677740
new_val_cell 10754
next0 17794
opcode_need_relink 0
pareval 6
pareval_worker 12
parfor 142
parfor0 142
parfor_worker 5207
parforprime 6
parforprime0 6
parforvec 18
parforvec0 18
pari_close_evaluator 32001
pari_init_evaluator 31852
pari_self 35
parsum 6
parvector 12
parvector_worker 59915
pop_lex 4421435
pop_localprec 83934
pop_val 10628
pop_val_if_newer 160808
ptr_proplock 8391677
push_lex 4426823
push_localbitprec 77
push_localprec 91886
pushlex 59952177
pushvalue 28
reset_break 73930
restore_trace 22389
restore_vars 213294093
return0 50567
safeel 0
safegcoeff 0
safegel 0
safelistel 0
set_lex 30194217
st_alloc 2119720138
trace_push 217389115
zerovalue 14

Generated by: LCOV version 1.11