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 16962-5a32637) Lines: 801 1290 62.1 %
Date: 2014-10-29 Functions: 66 97 68.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 377 804 46.9 %

Function Name Sort by function name Hit count Sort by hit count
bincopy_relink 0
break0 70175
change_compo 8193038
changelex 47998909
changevalue 5658289
check_array_index 29029403
checkvalue 37447585
closure_callgen1 2450
closure_callgen2 7994
closure_callgenall 0
closure_callgenvec 14
closure_callvoid1 0
closure_castgen 20795835
closure_castlong 0
closure_context 56
closure_disassemble 0
closure_err 5913
closure_eval 76880597
closure_evalbrk 105
closure_evalgen 9375428
closure_evalnobrk 21195798
closure_evalres 52156
closure_evalvoid 35347589
closure_func_err 6088
closure_relink 0
closure_return 10961677
closure_returnupto 10458
closure_trapgen 21
closure_unlink 0
closure_varn 42245
copybin_unlink 0
copylex 8190686
copyupto 11492987
copyvalue 737520
disassemble_cast 0
eq_id 0
err_var 0
evalstate_clone 0
evalstate_reset 105
evalstate_restore 20662
evalstate_restore_err 14700
evalstate_save 1278870
freeep 15081
freelex 42393147
gen_relink 0
gen_unlink 0
get_arg_name 14
get_lex 22132198
get_localprec 10619174
get_next_label 126
gp_call 1946
gp_callbool 504
gp_callvoid 0
gp_eval 17215093
gp_evalbool 166663
gp_evalupto 4445
gp_evalvoid 3648680
hash_from_link 0
hash_id 0
localprec 7
loop_break 29246305
lvar_make_safe 0
new_ptr 34052137
new_val_cell 6622
next0 65415
opcode_need_relink 0
pareval 0
pareval_worker 0
parfor 0
parfor_worker 0
parforprime 0
pari_close_evaluator 1189
pari_init_evaluator 1201
parsum 0
parvector 0
parvector_worker 0
pop_lex 2586627
pop_localprec 21
pop_val 6587
pop_val_if_newer 562179
ptr_proplock 8193017
push_lex 2587045
push_localprec 28
pushlex 16797438
pushvalue 28
reset_break 21670
restore_trace 20662
restore_vars 76869364
return0 154
safeel 0
safegcoeff 0
safegel 0
safelistel 0
set_lex 23365784
st_alloc 894697922
trace_push 79467341
zerovalue 14

Generated by: LCOV version 1.9