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 16827-3d78da8) Lines: 858 1269 67.6 %
Date: 2014-09-29 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 70175
change_compo 8193031
changelex 47998938
changevalue 5658821
check_array_index 29029752
checkvalue 37288001
closure_callgen1 2450
closure_callgen2 7994
closure_callgenall 0
closure_callgenvec 28
closure_callvoid1 0
closure_castgen 20796212
closure_castlong 0
closure_context 56
closure_disassemble 0
closure_err 2590
closure_eval 76792949
closure_evalbrk 105
closure_evalgen 9379154
closure_evalnobrk 21102472
closure_evalres 53089
closure_evalvoid 35348560
closure_func_err 2772
closure_relink 4
closure_return 10962658
closure_returnupto 10472
closure_trapgen 21
closure_unlink 4
closure_varn 42336
copybin_unlink 8
copylex 8190686
copyupto 11511383
copyvalue 737513
disassemble_cast 0
eq_id 12
err_var 0
evalstate_clone 0
evalstate_reset 105
evalstate_restore 17339
evalstate_restore_err 14693
evalstate_save 1279963
freeep 18436
freelex 42393594
gen_relink 20
gen_unlink 24
get_arg_name 14
get_lex 22132538
get_next_label 126
gp_call 1946
gp_callbool 504
gp_callvoid 0
gp_eval 17150567
gp_evalbool 2184
gp_evalupto 4382
gp_evalvoid 3648680
hash_from_link 4
hash_id 24
loop_break 29247094
lvar_make_safe 0
new_ptr 34052109
new_val_cell 7013
next0 65415
opcode_need_relink 72
pareval 0
pareval_worker 0
parfor 0
parfor_worker 0
parforprime 0
pari_close_evaluator 1186
pari_init_evaluator 1218
parsum 0
parvector 0
parvector_worker 0
pop_lex 2586999
pop_val 6946
pop_val_if_newer 33530
ptr_proplock 8193010
push_lex 2587478
pushlex 16797452
pushvalue 28
reset_break 18347
restore_trace 17339
restore_vars 76781689
return0 154
safeel 0
safegcoeff 0
safegel 0
safelistel 0
set_lex 23281616
st_alloc 893932698
trace_push 79380049
zerovalue 14

Generated by: LCOV version 1.9