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 21940-9a7b1a1) Lines: 1053 1394 75.5 %
Date: 2018-02-22 06:15:58 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 8545152
changelex 163185028
changevalue 29054890
check_array_index 98767495
checkvalue 111767576
checkvalueptr 23111459
closure_callgen1 257753
closure_callgen1prec 56626
closure_callgen2 89173
closure_callgenall 12
closure_callgenvec 957918
closure_callgenvecprec 147
closure_callvoid1 0
closure_castgen 89445854
closure_castlong 5467
closure_context 84
closure_disassemble 0
closure_err 8364
closure_eval 225661487
closure_evalbrk 161
closure_evalgen 23635908
closure_evalnobrk 33998293
closure_evalres 88521
closure_evalvoid 132224603
closure_func_err 8823
closure_relink 0
closure_return 35886659
closure_returnupto 1360589
closure_trapgen 35
closure_unlink 0
closure_varn 997058
copybin_unlink 8
copylex 8594033
copyupto 20211565
copyvalue 737989
disassemble_cast 0
err_var 0
evalstate_clone 0
evalstate_reset 270
evalstate_restore 42871
evalstate_restore_err 34423
evalstate_save 1360738
freeep 26168
freelex 147345768
gen_relink 0
gen_unlink 12
get_arg_name 21
get_lex 79165322
get_localbitprec 14196832
get_localprec 14179892
get_next_label 182
gp_call 18879
gp_call2 91
gp_callbool 672
gp_callprec 3423
gp_callvoid 0
gp_eval 7665275
gp_evalbool 166999
gp_evalprec 19040
gp_evalupto 571676
gp_evalvoid 3654644
gp_evalvoid2 4037
hash_from_link 0
localbitprec 84
localprec 7959
loop_break 125832452
lvar_make_safe 0
new_ptr 59465918
new_val_cell 12420
next0 20349
opcode_need_relink 0
pareval 6
pareval_worker 12
parfor 142
parfor0 142
parfor_worker 5199
parforprime 6
parforprime0 6
parforvec 18
parforvec0 18
pari_close_evaluator 90501
pari_init_evaluator 90256
pari_self 35
parsum 6
parvector 12
parvector_worker 59742
pop_lex 4655184
pop_localprec 76604
pop_val 12266
pop_val_if_newer 174465
ptr_proplock 8545390
push_lex 4795492
push_localbitprec 84
push_localprec 84563
pushlex 60361312
pushvalue 28
reset_break 96659
restore_trace 42871
restore_vars 225745026
return0 52750
safeel 0
safegcoeff 0
safegel 0
safelistel 0
set_lex 41021725
st_alloc 2353685715
trace_push 230117324
zerovalue 14

Generated by: LCOV version 1.11