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-bordeaux1.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 17404-c89e0b8) Lines: 818 1299 63.0 %
Date: 2015-01-29 Functions: 69 100 69.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 384 812 47.3 %

Function Name Sort by function name Hit count Sort by hit count
bincopy_relink 0
break0 70175
change_compo 8193430
changelex 50543311
changevalue 5662566
check_array_index 29866443
checkvalue 39178384
closure_callgen1 2597
closure_callgen2 8085
closure_callgenall 0
closure_callgenvec 14
closure_callvoid1 0
closure_castgen 21630033
closure_castlong 651
closure_context 56
closure_disassemble 0
closure_err 6325
closure_eval 80199697
closure_evalbrk 105
closure_evalgen 9385193
closure_evalnobrk 22010745
closure_evalres 56909
closure_evalvoid 36969413
closure_func_err 6570
closure_relink 0
closure_return 11834241
closure_returnupto 10696
closure_trapgen 21
closure_unlink 0
closure_varn 42763
copybin_unlink 0
copylex 8191064
copyupto 11528059
copyvalue 737534
disassemble_cast 0
err_var 0
evalstate_clone 0
evalstate_reset 119
evalstate_restore 21179
evalstate_restore_err 14805
evalstate_save 1288453
freeep 20736
freelex 44270526
gen_relink 0
gen_unlink 0
get_arg_name 14
get_lex 22962413
get_localprec 10652032
get_next_label 126
gp_call 2093
gp_call2 91
gp_callbool 504
gp_callvoid 0
gp_eval 17221379
gp_evalbool 166943
gp_evalupto 10451
gp_evalvoid 3648680
gp_evalvoid2 0
hash_from_link 0
localprec 7
loop_break 30867947
lvar_make_safe 0
new_ptr 34052879
new_val_cell 7665
next0 65415
opcode_need_relink 0
pareval 0
pareval_worker 0
parfor 0
parfor0 0
parfor_worker 0
parforprime 0
parforprime0 0
pari_close_evaluator 1231
pari_init_evaluator 1243
pari_self 35
parsum 0
parvector 0
parvector_worker 0
pop_lex 2605765
pop_localprec 21
pop_val 7623
pop_val_if_newer 66235
ptr_proplock 8193661
push_lex 2606190
push_localprec 28
pushlex 18492796
pushvalue 28
reset_break 22411
restore_trace 21179
restore_vars 80188422
return0 364
safeel 0
safegcoeff 0
safegel 0
safelistel 0
set_lex 23373484
st_alloc 927612789
trace_push 82805579
zerovalue 14

Generated by: LCOV version 1.9