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 17110-9967e23) Lines: 883 1293 68.3 %
Date: 2014-11-26 Functions: 76 98 77.6 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 423 808 52.4 %

Function Name Sort by function name Hit count Sort by hit count
bincopy_relink 0
break0 50125
change_compo 5852170
changelex 36100300
changevalue 4042223
check_array_index 21327512
checkvalue 27964728
closure_callgen1 1855
closure_callgen2 5710
closure_callgenall 0
closure_callgenvec 10
closure_callvoid1 0
closure_castgen 15446392
closure_castlong 0
closure_context 40
closure_disassemble 0
closure_err 3839
closure_eval 57378028
closure_evalbrk 75
closure_evalgen 6798586
closure_evalnobrk 15729735
closure_evalres 38831
closure_evalvoid 26405061
closure_func_err 3964
closure_relink 4
closure_return 8444571
closure_returnupto 7575
closure_trapgen 15
closure_unlink 4
closure_varn 30330
copybin_unlink 8
copylex 5850490
copyupto 8334766
copyvalue 526800
disassemble_cast 0
eq_id 12
err_var 0
evalstate_clone 0
evalstate_reset 75
evalstate_restore 14419
evalstate_restore_err 10545
evalstate_save 915566
freeep 13437
freelex 31567753
gen_relink 20
gen_unlink 24
get_arg_name 10
get_lex 16400281
get_localprec 7768678
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 4
hash_id 24
localprec 5
loop_break 22046981
lvar_make_safe 0
new_ptr 24323010
new_val_cell 5030
next0 46725
opcode_need_relink 72
pareval 0
pareval_worker 0
parfor 0
parfor_worker 0
parforprime 0
pari_close_evaluator 916
pari_init_evaluator 948
pari_self 25
parsum 0
parvector 0
parvector_worker 0
pop_lex 1860813
pop_localprec 15
pop_val 4973
pop_val_if_newer 21368
ptr_proplock 5852155
push_lex 1861128
push_localprec 20
pushlex 13200520
pushvalue 20
reset_break 15139
restore_trace 14419
restore_vars 57369949
return0 110
safeel 0
safegcoeff 0
safegel 0
safelistel 0
set_lex 16803604
st_alloc 663354315
trace_push 59238936
zerovalue 10

Generated by: LCOV version 1.9