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 16624-25b9976) Lines: 857 1267 67.6 %
Date: 2014-06-24 Functions: 71 93 76.3 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 414 796 52.0 %

Function Name Sort by function name Hit count Sort by hit count
bincopy_relink 0
break0 50125
change_compo 5852165
changelex 34040781
changevalue 4041948
check_array_index 20735562
checkvalue 26636503
closure_callgen1 1750
closure_callgen2 5710
closure_callgenall 0
closure_callgenvec 20
closure_callvoid1 0
closure_castgen 14854462
closure_castlong 0
closure_context 40
closure_disassemble 0
closure_err 1861
closure_eval 54711469
closure_evalbrk 75
closure_evalgen 6726658
closure_evalnobrk 14986153
closure_evalres 38286
closure_evalvoid 25167782
closure_func_err 1991
closure_relink 4
closure_return 7830801
closure_returnupto 7480
closure_trapgen 15
closure_unlink 4
closure_varn 30200
copybin_unlink 8
copylex 5850490
copyupto 8342521
copyvalue 526795
disassemble_cast 0
eq_id 12
err_var 0
evalstate_clone 0
evalstate_reset 75
evalstate_restore 12386
evalstate_restore_err 10490
evalstate_save 914651
freeep 13192
freelex 30281313
gen_relink 20
gen_unlink 24
get_arg_name 10
get_lex 15808941
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 20809405
lvar_make_safe 0
new_ptr 24322935
new_val_cell 4980
next0 46725
opcode_need_relink 72
pareval 0
pareval_worker 0
parfor 0
parfor_worker 0
parforprime 0
pari_close_evaluator 881
pari_init_evaluator 913
parsum 0
parvector 0
parvector_worker 0
pop_lex 1848153
pop_val 4923
pop_val_if_newer 23920
ptr_proplock 5852150
push_lex 1848513
pushlex 11998100
pushvalue 20
reset_break 13101
restore_trace 12386
restore_vars 54703385
return0 105
safeel 0
safegcoeff 0
safegel 0
safelistel 0
set_lex 16692677
st_alloc 637989207
trace_push 56559717
zerovalue 10

Generated by: LCOV version 1.9