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-bordeaux.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.10.0 lcov report (development 21064-a7054ad) Lines: 1057 1397 75.7 %
Date: 2017-09-25 06:24:50 Functions: 93 110 84.5 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
bincopy_relink 0
break0 70295
change_compo 8401953
changelex 144425471
changevalue 19963402
check_array_index 80501805
checkvalue 99892972
checkvalueptr 14499926
closure_callgen1 96898
closure_callgen1prec 56493
closure_callgen2 76559
closure_callgenall 12
closure_callgenvec 730035
closure_callgenvecprec 105
closure_callvoid1 0
closure_castgen 71869058
closure_castlong 665
closure_context 84
closure_disassemble 0
closure_err 7853
closure_eval 213843127
closure_evalbrk 161
closure_evalgen 23585273
closure_evalnobrk 32220293
closure_evalres 81703
closure_evalvoid 123005295
closure_func_err 8284
closure_relink 0
closure_return 35113100
closure_returnupto 959409
closure_trapgen 35
closure_unlink 0
closure_varn 996821
copybin_unlink 8
copylex 8448181
copyupto 15236257
copyvalue 740642
disassemble_cast 0
err_var 0
evalstate_clone 0
evalstate_reset 228
evalstate_restore 22557
evalstate_restore_err 14641
evalstate_save 1317588
freeep 24334
freelex 127883973
gen_relink 0
gen_unlink 12
get_arg_name 14
get_lex 78896917
get_localbitprec 14125864
get_localprec 14109974
get_next_label 161
gp_call 18256
gp_call2 91
gp_callbool 672
gp_callprec 3290
gp_callvoid 0
gp_eval 7676384
gp_evalbool 166999
gp_evalprec 19040
gp_evalupto 641949
gp_evalvoid 3654644
gp_evalvoid2 4029
hash_from_link 0
localbitprec 84
localprec 7952
loop_break 116725657
lvar_make_safe 0
new_ptr 50733810
new_val_cell 11510
next0 17794
opcode_need_relink 0
pareval 6
pareval_worker 12
parfor 142
parfor0 142
parfor_worker 5193
parforprime 6
parforprime0 6
parforvec 18
parforvec0 18
pari_close_evaluator 66082
pari_init_evaluator 65958
pari_self 35
parsum 6
parvector 12
parvector_worker 60241
pop_lex 4454405
pop_localprec 76282
pop_val 11384
pop_val_if_newer 211964
ptr_proplock 8402177
push_lex 4459795
push_localbitprec 84
push_localprec 84234
pushlex 59944384
pushvalue 28
reset_break 74126
restore_trace 22557
restore_vars 213900037
return0 50572
safeel 0
safegcoeff 0
safegel 0
safelistel 0
set_lex 30335473
st_alloc 2125749797
trace_push 218170798
zerovalue 14

Generated by: LCOV version 1.11