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 - es.c (source / functions) Hit Total Coverage
Test: PARI/GP v2.12.0 lcov report (development 22872-edcf83abb) Lines: 1591 2678 59.4 %
Date: 2018-07-20 05:36:03 Functions: 212 310 68.4 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
GENtoGENstr_nospace 0
GENtoTeXstr 0
Strexpand 0
_cfwrite 0
_fwrite 0
_initout 0
_lfwrite 0
blancs 0
brute 0
check_compress 0
check_gp_file 0
check_magic 0
check_secure 0
dbg 0
dbgGEN 0
dbg_addr 0
dbg_pari_heap 0
dbg_word 0
dft_help 0
do_append 0
externstr 0
file_is_binary 0
forpath_init 0
forpath_next 0
fputGEN_pariout 0
get_file 0
get_free_gp_file 0
get_lines 0
gp_dlopen 0
gp_embedded 0
gp_embedded_init 0
gp_fileclose 0
gp_fileextern 0
gp_fileflush 0
gp_fileflush0 0
gp_fileopen 0
gp_fileread 0
gp_filereadstr 0
gp_filewrite 0
gp_filewrite1 0
gp_getenv 0
gp_read_from_input 0
gp_read_str_multiline 0
gp_readvec_file 0
gpextern 0
gpinstall 0
gpsystem 0
gpwritebin 0
install0 0
is_long_ok 0
is_sizeoflong_ok 0
matbrute 0
new_gp_file 0
ok_pipe 0
outmat 0
output 0
pari_ask_confirm 0
pari_file_exists 0
pari_fopen 0
pari_fprintf 0
pari_fread_longs 0
pari_nb_hist 0
pari_safefopen 0
pari_strndup 0
pari_unique_filename 0
pari_unique_filename_suffix 0
pari_vfprintf 0
path_is_absolute 0
print_entree 0
print_functions_hash 0
prints 0
rdGEN 0
rd_long 0
rdstr 0
readbin 0
readobj 0
readstr 0
str_addr 0
string_gets 0
strip_last_nl 0
switchout 0
texe 0
texparen 0
try_dlopen 0
try_name 0
try_open 0
try_pipe 0
uordinal 0
vsigne 0
wrGEN 0
wr_long 0
write1 0
writeGEN 0
write_magic 0
writebin 0
writenamedGEN 0
writetex 0
wrstr 0
lim_lines_output 2
GENtostr 4
strftime_expand 4
err_flush 7
gp_read_file 7
itoc 7
printp 7
printtex 7
switchin 7
switchin_last 7
term_height 7
term_height_intern 7
warning0 7
decode_color 12
log10_2 12
Strtex 14
error0 14
pari_sprint0 14
Strchr 21
pari_get_histtime 21
printsep1 21
gp_readvec_stream 35
zerotostr 35
is_magic_ok 43
killallfiles 49
texi 56
pari_is_file 58
print0_file 58
switchout_get_FILE 58
wr 58
wr_check 58
write0 58
wr_texnome 70
gtolong_OK 77
is_dir_stat 84
pari_is_dir 84
pari_get_hist 91
get_texvar 98
wr_lead_texnome 98
normalOutS 101
history 112
times_texnome 112
texVpowE 140
texexpo 140
texnome 140
real0tostr_width_frac 155
texi_sign 182
init_unique 279
pari_dir_exists 279
pari_is_rwx 279
pari_tmp_dir 279
pari_unique_dir 279
err_printf 313
mat0n 378
printf0 518
env_ok 558
pari_printf 599
pari_vprintf 599
GENtoGENstr 693
GENtostr_fun 697
Strprintf 721
term_color 774
printsep 798
real0tostr 1161
stack_strcat 1218
dopr_arg_vector 1239
str_alloc0 1452
initout 1545
pari_init_homedir 1545
pari_stdin_isatty 1545
resetout 1545
pari_close_files 1595
pari_close_homedir 1595
gsprintf 1603
v_get_arg 1638
print_precontext 1652
gvsprintf 1759
in_help 1794
ltoc 1876
fix_buffer 2121
stack_sprintf 2184
stack_strdup 2184
print_context 2359
GENtostr_raw 2366
pari_get_homedir 3074
gp_read_stream 3185
_expand_env 4674
_path_expand 4674
path_expand 4674
gp_read_stream_buf 4795
delete_buffer 4829
new_buffer 4829
wr_vecsmall 4993
pari_unlink 5821
init_filtre 6404
new_line 7954
out_printf 8264
filestate_restore 8819
print_errcontext 9038
zeros 9043
tmp_restore 9103
out_vprintf 9712
gp_filter 10777
Str 10787
RgV_to_str 10801
Str_fun 10801
str_print0 10873
quote_string 11578
pari_sprintf 13292
paren 14098
print_prefixed_text 14437
print1 17360
term_width 17810
term_width_intern 17810
GENtostr_unquoted 18718
absrtostr 20790
os_getenv 21473
pari_get_infile 22911
pari_fopengz 22974
pari_vsprintf 26947
normalErrF 27374
sm_dopr 28186
pari_fopen_or_fail 28302
pari_open_file 28302
pari_strdup 30108
type_name 34281
fmtnum 36082
gen_output 39450
gen_output_fun 39450
matbruti 39461
absrtostr_width_frac 40291
get_sigd 40522
fmtreal 40550
pari_puts 40573
init_linewrap 40884
shift_add 40977
isdenom 45801
str_printf 49795
out_term_color 50304
wr_dec 50870
pari_fclose 51227
newfile 51297
pari_kill_file 51297
term_get_color 60254
ex10 61074
fmtstr 64279
str_putscut 64279
pari_add_hist 69573
pari_fread_chars 70931
dosign 75864
outpad 76597
str_arg_vprintf 77981
pari_last_was_newline 78895
get_var 81725
wr_lead_monome 82278
print 88387
filestate_save 94795
pari_set_last_newline 99177
input_loop 99435
print0 105761
out_print0 106587
pari_thread_close_files 112188
pari_init_files 112745
popinfile 113670
filestate_close 120236
wr_monome 127785
str_long 130199
str_ulong 130199
times_monome 135009
file_getline 138763
file_input 138763
filtre0 147966
pari_flush 152942
strlen_real 156442
get_fun 156914
normalOutF 162257
pari_putc 162465
monome 166313
VpowE 181881
wrexpo 181881
stack_GENtostr_fun 182076
_flush_log 189631
stack_GENtostr_fun_unquoted 219909
kill_file_stack 222740
str_init 225292
isfactor 225771
puts_lw 246241
normalErrS 252977
_fputs 253078
_puts_log 253078
itostr 308300
str_absint 432462
out_puts 442975
normalErrC 448569
str_alloc 459251
out_putc 612533
bruti_intern 752149
itostr_sign 800527
numdig 800527
bruti 904906
set_last_newline 1052836
bruti_sign 1080116
print_0_or_pm1 1080298
isone 1244196
utodec 1431676
str_puts 1596667
isnull_for_pol 1656970
isnull 3145319
putc_lw 7166797
normalOutC 7222032
_putc_log 7670601
str_putc 8965401

Generated by: LCOV version 1.13