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 17238-ce76349) Lines: 818 1294 63.2 %
Date: 2014-12-20 Functions: 69 97 71.1 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 383 808 47.4 %

Function Name Sort by function name Hit count Sort by hit count
bincopy_relink 0
break0 70175
change_compo 8193416
changelex 50543311
changevalue 5662041
check_array_index 29866226
checkvalue 39175332
closure_callgen1 2597
closure_callgen2 8085
closure_callgenall 0
closure_callgenvec 14
closure_callvoid1 0
closure_castgen 21629830
closure_castlong 651
closure_context 56
closure_disassemble 0
closure_err 6129
closure_eval 80196624
closure_evalbrk 105
closure_evalgen 9384794
closure_evalnobrk 22010199
closure_evalres 55516
closure_evalvoid 36969413
closure_func_err 6311
closure_relink 0
closure_return 11832113
closure_returnupto 10696
closure_trapgen 21
closure_unlink 0
closure_varn 42742
copybin_unlink 0
copylex 8191064
copyupto 11523250
copyvalue 737520
disassemble_cast 0
err_var 0
evalstate_clone 0
evalstate_reset 112
evalstate_restore 20976
evalstate_restore_err 14798
evalstate_save 1286479
freeep 20638
freelex 44263526
gen_relink 0
gen_unlink 0
get_arg_name 14
get_lex 22962413
get_localprec 10651941
get_next_label 126
gp_call 2093
gp_call2 91
gp_callbool 504
gp_callvoid 0
gp_eval 17220945
gp_evalbool 166663
gp_evalupto 10297
gp_evalvoid 3648680
hash_from_link 0
localprec 7
loop_break 30867947
lvar_make_safe 0
new_ptr 34052858
new_val_cell 7532
next0 65415
opcode_need_relink 0
pareval 0
pareval_worker 0
parfor 0
parfor_worker 0
parforprime 0
pari_close_evaluator 1231
pari_init_evaluator 1243
pari_self 35
parsum 0
parvector 0
parvector_worker 0
pop_lex 2605688
pop_localprec 21
pop_val 7497
pop_val_if_newer 49561
ptr_proplock 8193647
push_lex 2606113
push_localprec 28
pushlex 18492040
pushvalue 28
reset_break 22201
restore_trace 20976
restore_vars 80185356
return0 364
safeel 0
safegcoeff 0
safegel 0
safelistel 0
set_lex 23372938
st_alloc 927529846
trace_push 82802429
zerovalue 14

Generated by: LCOV version 1.9