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 - es.c (source / functions) Hit Total Coverage
Test: PARI/GP v2.8.0 lcov report (development 16912-212c0f0) Lines: 1798 2461 73.1 %
Date: 2014-10-20 Functions: 240 285 84.2 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 1064 1862 57.1 %

Function Name Sort by function name Hit count Sort by hit count
GENtoGENstr 693
GENtoGENstr_nospace 0
GENtoTeXstr 0
GENtostr 0
GENtostr1 22837
GENtostr_aux 122503
GENtostr_fun 35504
GENtostr_fun_unquoted 122401
GENtostr_unquoted 6235
RgV_to_str 0
RgV_to_str_fun 9846
Str 9820
Str_fun 9834
Strchr 7
Strexpand 12
Strprintf 721
Strtex 14
VpowE 121629
_cfwrite 12
_expand_env 3722
_flush_log 145023
_fputs 205600
_fwrite 120
_initout 0
_lfwrite 108
_path_expand 3722
_putc_log 5983867
_puts_log 205600
absrtostr 11124
absrtostr_width_frac 259
blancs 0
brute 0
bruti 503750
bruti_intern 490623
bruti_sign 628423
check_magic 8
check_secure 20
dbg 0
dbgGEN 0
dbg_addr 0
dbg_pari_heap 0
dbg_word 0
decode_color 0
delete_buffer 3644
delete_dirs 2404
dft_help 7
do_append 0
dopr_arg_vector 1281
dosign 3977
eng_ord 0
env_ok 1078
err_flush 0
err_printf 12
error0 14
ex10 11376
externstr 0
file_getline 62478
file_input 62458
file_is_binary 12
filestate_restore 5457
filtre0 71040
fix_buffer 1687
fmtnum 3585
fmtreal 602
fmtstr 46433
forpath_init 16
forpath_next 16
fputGEN_pariout 0
gen_output 18666
gen_output_fun 18666
get_file 0
get_fun 83395
get_lines 4
get_sigd 574
get_texvar 98
get_var 49777
gp_dlopen 7
gp_expand_path 1218
gp_filter 9793
gp_getenv 8
gp_read_file 15
gp_read_stream 2373
gp_read_stream_buf 3351
gp_readvec_file 4
gp_readvec_stream 25
gpextern 0
gpinstall 7
gpsystem 20
gpwritebin 8
gsprintf 14
gvsprintf 77
history 112
in_help 595
init_filtre 4625
init_linewrap 19809
init_unique 539
initout 1218
input_loop 50138
install0 7
is_dir_stat 16
is_long_ok 16
is_magic_ok 32
is_sizeoflong_ok 8
isdenom 32018
isfactor 161147
isnull 2471886
isone 812357
itoc 0
itostr 266804
itostr_sign 572266
kill_file_stack 2407
killallfiles 1221
lim_lines_output 0
log10_2 12
ltoc 84
matbrute 0
matbruti 19160
monome 116442
new_buffer 3676
new_line 8071
newfile 79068
normalErrC 298871
normalErrF 16357
normalErrS 205581
normalOutC 5684996
normalOutF 128666
normalOutS 19
numdig 572266
ok_pipe 0
os_getenv 16187
os_signal 13238
out_print0 64683
out_printf 4905
out_putc 436581
out_puts 306383
out_term_color 35555
out_vprintf 5610
outmat 0
outpad 4159
output 0
paren 7119
pari_add_hist 33340
pari_ask_confirm 0
pari_close_files 1186
pari_close_homedir 1186
pari_default_path 1218
pari_dir_exists 539
pari_fclose 79033
pari_file_exists 0
pari_flush 123132
pari_fopen 0
pari_fopen_or_fail 57289
pari_fopengz 21714
pari_fprintf 0
pari_fread_chars 69613
pari_fread_longs 92
pari_get_hist 91
pari_get_histtime 21
pari_get_homedir 2444
pari_get_infile 21723
pari_init_files 1218
pari_init_homedir 1218
pari_is_dir 16
pari_is_file 32
pari_is_rwx 539
pari_kill_file 79068
pari_last_tmp_file 52279
pari_last_was_newline 38881
pari_nb_hist 0
pari_open_file 57289
pari_printf 490
pari_putc 136450
pari_puts 20111
pari_safefopen 0
pari_set_last_newline 51909
pari_sprint0 14
pari_sprintf 10444
pari_stdin_isatty 1218
pari_strdup 34211
pari_strndup 0
pari_tmp_dir 539
pari_unique_dir 539
pari_unique_filename 0
pari_unlink 11749
pari_vfprintf 0
pari_vprintf 490
pari_vsprintf 11718
path_expand 3722
path_is_absolute 16
popinfile 2388
print 61050
print0 64501
print0_file 32
print1 3444
print_0_or_pm1 628617
print_context 221
print_entree 0
print_errcontext 5506
print_functions_hash 0
print_prefixed_text 10924
printf0 560
prints 490
printsep 161
printsep1 14
printtex 7
putc_lw 5636589
puts_lw 138953
quote_string 10920
rdGEN 20
rd_long 72
rdstr 12
readbin 8
readobj 28
readstr 4
real0tostr 696
real0tostr_width_frac 35
resetout 1218
set_last_newline 740283
shift_add 1225
sm_dopr 18686
stack_sprintf 1274
stack_strcat 952
stack_strdup 1274
str_absint 294810
str_addr 0
str_alloc 308167
str_alloc0 822
str_init 142950
str_long 83248
str_print0 46
str_putc 6097457
str_puts 919434
str_putscut 46433
str_ulong 83248
strftime_expand 0
strlen_real 142071
switchin 23
switchin_last 7
switchout 0
switchout_get_FILE 32
term_color 518
term_get_color 41499
term_height 7
term_height_intern 7
term_width 12646
term_width_intern 12646
texVpowE 140
texe 0
texexpo 140
texi 60
texi_sign 194
texnome 140
texparen 0
times_monome 94888
times_texnome 112
try_dlopen 0
try_name 16
try_open 16
try_pipe 0
type_name 20243
utodec 1143398
v_get_arg 1869
vsigne 0
warning0 7
wr 32
wrGEN 20
wr_check 40
wr_dec 5932
wr_lead_monome 50260
wr_lead_texnome 98
wr_long 88
wr_monome 92648
wr_texnome 70
wr_vecsmall 1890
wrexpo 121629
write0 20
write1 8
writeGEN 4
write_magic 8
writebin 8
writenamedGEN 12
writetex 4
wrstr 12
zeros 4748
zerotostr 21

Generated by: LCOV version 1.9