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 17097-9391e68) Lines: 806 1293 62.3 %
Date: 2014-11-21 Functions: 67 98 68.4 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 381 808 47.2 %

Function Name Sort by function name Hit count Sort by hit count
bincopy_relink 0
break0 50125
change_compo 5852170
changelex 36100300
changevalue 4042130
check_array_index 21327376
checkvalue 27964433
closure_callgen1 1855
closure_callgen2 5710
closure_callgenall 0
closure_callgenvec 10
closure_callvoid1 0
closure_castgen 15446256
closure_castlong 0
closure_context 40
closure_disassemble 0
closure_err 4415
closure_eval 57323509
closure_evalbrk 75
closure_evalgen 6732694
closure_evalnobrk 15741639
closure_evalres 38325
closure_evalvoid 26405061
closure_func_err 4540
closure_relink 0
closure_return 8444040
closure_returnupto 7575
closure_trapgen 15
closure_unlink 0
closure_varn 30325
copybin_unlink 0
copylex 5850490
copyupto 8249565
copyvalue 526800
disassemble_cast 0
eq_id 0
err_var 0
evalstate_clone 0
evalstate_reset 75
evalstate_restore 14995
evalstate_restore_err 10545
evalstate_save 914961
freeep 13384
freelex 31567589
gen_relink 0
gen_unlink 0
get_arg_name 10
get_lex 16400281
get_localprec 7657219
get_next_label 90
gp_call 1495
gp_callbool 360
gp_callvoid 0
gp_eval 12300125
gp_evalbool 119045
gp_evalupto 6805
gp_evalvoid 2606200
hash_from_link 0
hash_id 0
localprec 5
loop_break 22046981
lvar_make_safe 0
new_ptr 24323005
new_val_cell 4950
next0 46725
opcode_need_relink 0
pareval 0
pareval_worker 0
parfor 0
parfor_worker 0
parforprime 0
pari_close_evaluator 880
pari_init_evaluator 892
pari_self 25
parsum 0
parvector 0
parvector_worker 0
pop_lex 1860669
pop_localprec 15
pop_val 4924
pop_val_if_newer 21926
ptr_proplock 5852155
push_lex 1860984
push_localprec 20
pushlex 13200505
pushvalue 20
reset_break 15715
restore_trace 14995
restore_vars 57315482
return0 110
safeel 0
safegcoeff 0
safegel 0
safelistel 0
set_lex 16746724
st_alloc 662752883
trace_push 59184273
zerovalue 10

Generated by: LCOV version 1.9