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 21351-66b5338) Lines: 1050 1390 75.5 %
Date: 2017-11-22 06:21:08 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 70296
change_compo 8545138
changelex 146151761
changevalue 20540636
check_array_index 81721200
checkvalue 103237287
checkvalueptr 14600446
closure_callgen1 222670
closure_callgen1prec 56493
closure_callgen2 89173
closure_callgenall 12
closure_callgenvec 949607
closure_callgenvecprec 105
closure_callvoid1 0
closure_castgen 72413706
closure_castlong 665
closure_context 84
closure_disassemble 0
closure_err 8161
closure_eval 217367589
closure_evalbrk 161
closure_evalgen 23626377
closure_evalnobrk 33935398
closure_evalres 84909
closure_evalvoid 124051303
closure_func_err 8627
closure_relink 0
closure_return 35836080
closure_returnupto 1317009
closure_trapgen 35
closure_unlink 0
closure_varn 996954
copybin_unlink 8
copylex 8594033
copyupto 20151445
copyvalue 737975
disassemble_cast 0
err_var 0
evalstate_clone 0
evalstate_reset 263
evalstate_restore 41933
evalstate_restore_err 33709
evalstate_save 1356501
freeep 25587
freelex 130126187
gen_relink 0
gen_unlink 12
get_arg_name 14
get_lex 79554806
get_localbitprec 14132844
get_localprec 14116352
get_next_label 175
gp_call 18613
gp_call2 91
gp_callbool 672
gp_callprec 3290
gp_callvoid 0
gp_eval 7606097
gp_evalbool 166999
gp_evalprec 19040
gp_evalupto 571662
gp_evalvoid 3654644
gp_evalvoid2 4034
hash_from_link 0
localbitprec 84
localprec 7952
loop_break 117738219
lvar_make_safe 0
new_ptr 50954829
new_val_cell 12042
next0 17794
opcode_need_relink 0
pareval 6
pareval_worker 12
parfor 142
parfor0 142
parfor_worker 5179
parforprime 6
parforprime0 6
parforvec 18
parforvec0 18
pari_close_evaluator 92809
pari_init_evaluator 92683
pari_self 35
parsum 6
parvector 12
parvector_worker 59778
pop_lex 4653895
pop_localprec 76394
pop_val 11902
pop_val_if_newer 167010
ptr_proplock 8545355
push_lex 4794164
push_localbitprec 84
push_localprec 84346
pushlex 60352263
pushvalue 28
reset_break 93467
restore_trace 41933
restore_vars 217596112
return0 50503
safeel 0
safegcoeff 0
safegel 0
safelistel 0
set_lex 32430604
st_alloc 2167184174
trace_push 221916344
zerovalue 14

Generated by: LCOV version 1.11