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 20838-243a3c2) Lines: 1059 1392 76.1 %
Date: 2017-07-28 06:22:09 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 70289
change_compo 8391453
changelex 144326169
changevalue 19962807
check_array_index 80213451
checkvalue 99532969
checkvalueptr 14499877
closure_callgen1 96545
closure_callgen1prec 64145
closure_callgen2 76559
closure_callgenall 12
closure_callgenvec 396892
closure_callgenvecprec 105
closure_callvoid1 0
closure_castgen 71647237
closure_castlong 658
closure_context 84
closure_disassemble 0
closure_err 7783
closure_eval 213444282
closure_evalbrk 161
closure_evalgen 23560941
closure_evalnobrk 32094726
closure_evalres 80527
closure_evalvoid 123138255
closure_func_err 8214
closure_relink 0
closure_return 34786405
closure_returnupto 633400
closure_trapgen 35
closure_unlink 0
closure_varn 996555
copybin_unlink 8
copylex 8437681
copyupto 14432001
copyvalue 740642
disassemble_cast 0
err_var 0
evalstate_clone 0
evalstate_reset 228
evalstate_restore 22452
evalstate_restore_err 14606
evalstate_save 1316135
freeep 23900
freelex 126815748
gen_relink 0
gen_unlink 12
get_arg_name 14
get_lex 79051611
get_localbitprec 14144194
get_localprec 14128304
get_next_label 161
gp_call 18102
gp_call2 91
gp_callbool 672
gp_callprec 3290
gp_callvoid 0
gp_eval 7551046
gp_evalbool 166999
gp_evalprec 19040
gp_evalupto 501949
gp_evalvoid 3654644
gp_evalvoid2 4030
hash_from_link 0
localbitprec 77
localprec 7952
loop_break 116837596
lvar_make_safe 0
new_ptr 50677762
new_val_cell 11237
next0 17794
opcode_need_relink 0
pareval 6
pareval_worker 12
parfor 142
parfor0 142
parfor_worker 5180
parforprime 6
parforprime0 6
parforvec 18
parforvec0 18
pari_close_evaluator 33269
pari_init_evaluator 33095
pari_self 35
parsum 6
parvector 12
parvector_worker 60067
pop_lex 4422836
pop_localprec 83934
pop_val 11111
pop_val_if_newer 165113
ptr_proplock 8391677
push_lex 4428226
push_localbitprec 77
push_localprec 91886
pushlex 59955408
pushvalue 28
reset_break 74014
restore_trace 22452
restore_vars 213701572
return0 50565
safeel 0
safegcoeff 0
safegel 0
safelistel 0
set_lex 30196492
st_alloc 2121082379
trace_push 217704538
zerovalue 14

Generated by: LCOV version 1.11