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 16741-1378b1c) Lines: 781 1269 61.5 %
Date: 2014-08-17 Functions: 62 93 66.7 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 375 798 47.0 %

Function Name Sort by function name Hit count Sort by hit count
bincopy_relink 0
break0 50125
change_compo 5852165
changelex 34284876
changevalue 4041890
check_array_index 20735443
checkvalue 26636403
closure_callgen1 1750
closure_callgen2 5710
closure_callgenall 0
closure_callgenvec 20
closure_callvoid1 0
closure_castgen 14854343
closure_castlong 0
closure_context 40
closure_disassemble 0
closure_err 2445
closure_eval 54941143
closure_evalbrk 75
closure_evalgen 6742299
closure_evalnobrk 15119430
closure_evalres 37865
closure_evalvoid 25248954
closure_func_err 2575
closure_relink 0
closure_return 7830385
closure_returnupto 7480
closure_trapgen 15
closure_unlink 0
closure_varn 30195
copybin_unlink 0
copylex 5850490
copyupto 8257464
copyvalue 526795
disassemble_cast 0
eq_id 0
err_var 0
evalstate_clone 0
evalstate_reset 75
evalstate_restore 12980
evalstate_restore_err 10495
evalstate_save 914161
freeep 13152
freelex 30281203
gen_relink 0
gen_unlink 0
get_arg_name 10
get_lex 15808943
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 0
hash_id 0
loop_break 20890764
lvar_make_safe 0
new_ptr 24322930
new_val_cell 4930
next0 46725
opcode_need_relink 0
pareval 0
pareval_worker 0
parfor 0
parfor_worker 0
parforprime 0
pari_close_evaluator 850
pari_init_evaluator 862
parsum 0
parvector 0
parvector_worker 0
pop_lex 1848018
pop_val 4905
pop_val_if_newer 25107
ptr_proplock 5852150
push_lex 1848383
pushlex 11998120
pushvalue 20
reset_break 13700
restore_trace 12980
restore_vars 54933111
return0 110
safeel 0
safegcoeff 0
safegel 0
safelistel 0
set_lex 16715824
st_alloc 639176688
trace_push 56789256
zerovalue 10

Generated by: LCOV version 1.9