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 16791-0d1274a) Lines: 858 1269 67.6 %
Date: 2014-09-16 Functions: 71 93 76.3 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 416 798 52.1 %

Function Name Sort by function name Hit count Sort by hit count
bincopy_relink 0
break0 50125
change_compo 5852165
changelex 34284922
changevalue 4042023
check_array_index 20735619
checkvalue 26634213
closure_callgen1 1750
closure_callgen2 5710
closure_callgenall 0
closure_callgenvec 20
closure_callvoid1 0
closure_castgen 14854519
closure_castlong 0
closure_context 40
closure_disassemble 0
closure_err 1874
closure_eval 54995839
closure_evalbrk 75
closure_evalgen 6808201
closure_evalnobrk 15107532
closure_evalres 38511
closure_evalvoid 25248970
closure_func_err 2004
closure_relink 4
closure_return 7831061
closure_returnupto 7480
closure_trapgen 15
closure_unlink 4
closure_varn 30225
copybin_unlink 8
copylex 5850490
copyupto 8347940
copyvalue 526795
disassemble_cast 0
eq_id 12
err_var 0
evalstate_clone 0
evalstate_reset 75
evalstate_restore 12409
evalstate_restore_err 10495
evalstate_save 914911
freeep 13247
freelex 30281435
gen_relink 20
gen_unlink 24
get_arg_name 10
get_lex 15808963
get_next_label 90
gp_call 1390
gp_callbool 360
gp_callvoid 0
gp_eval 12250405
gp_evalbool 1560
gp_evalupto 3130
gp_evalvoid 2606200
hash_from_link 4
hash_id 24
loop_break 20890780
lvar_make_safe 0
new_ptr 24322935
new_val_cell 5035
next0 46725
opcode_need_relink 72
pareval 0
pareval_worker 0
parfor 0
parfor_worker 0
parforprime 0
pari_close_evaluator 886
pari_init_evaluator 918
parsum 0
parvector 0
parvector_worker 0
pop_lex 1848170
pop_val 4978
pop_val_if_newer 24013
ptr_proplock 5852150
push_lex 1848535
pushlex 11998160
pushvalue 20
reset_break 13129
restore_trace 12409
restore_vars 54987755
return0 110
safeel 0
safegcoeff 0
safegel 0
safelistel 0
set_lex 16772704
st_alloc 639774172
trace_push 56844104
zerovalue 10

Generated by: LCOV version 1.9