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 16912-212c0f0) Lines: 878 1290 68.1 %
Date: 2014-10-20 Functions: 75 97 77.3 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 418 804 52.0 %

Function Name Sort by function name Hit count Sort by hit count
bincopy_relink 0
break0 70175
change_compo 8193031
changelex 47998909
changevalue 5658050
check_array_index 29029412
checkvalue 37282711
closure_callgen1 2450
closure_callgen2 7994
closure_callgenall 0
closure_callgenvec 14
closure_callvoid1 0
closure_castgen 20795865
closure_castlong 0
closure_context 56
closure_disassemble 0
closure_err 5310
closure_eval 76665039
closure_evalbrk 105
closure_evalgen 9360982
closure_evalnobrk 20994944
closure_evalres 51878
closure_evalvoid 35347589
closure_func_err 5485
closure_relink 4
closure_return 10961419
closure_returnupto 10458
closure_trapgen 21
closure_unlink 4
closure_varn 42238
copybin_unlink 8
copylex 8190686
copyupto 11484852
copyvalue 737513
disassemble_cast 0
eq_id 12
err_var 0
evalstate_clone 0
evalstate_reset 105
evalstate_restore 20052
evalstate_restore_err 14693
evalstate_save 1278563
freeep 14955
freelex 42392994
gen_relink 20
gen_unlink 24
get_arg_name 14
get_lex 22132198
get_localprec 10422628
get_next_label 126
gp_call 1946
gp_callbool 504
gp_callvoid 0
gp_eval 17050551
gp_evalbool 2184
gp_evalupto 4382
gp_evalvoid 3648680
hash_from_link 4
hash_id 24
localprec 7
loop_break 29246305
lvar_make_safe 0
new_ptr 34052109
new_val_cell 6586
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 2586490
pop_localprec 21
pop_val 6519
pop_val_if_newer 560925
ptr_proplock 8193010
push_lex 2586892
push_localprec 28
pushlex 16797438
pushvalue 28
reset_break 21060
restore_trace 20052
restore_vars 76653786
return0 154
safeel 0
safegcoeff 0
safegel 0
safelistel 0
set_lex 23153446
st_alloc 893175981
trace_push 79251630
zerovalue 14

Generated by: LCOV version 1.9