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 to exceed 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 23171-a5c0ed393) Lines: 1606 2617 61.4 %
Date: 2018-10-20 05:38:07 Functions: 205 302 67.9 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
GENtoGENstr_nospace 0
GENtoTeXstr 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_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
strexpand 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
printp 7
printtex 7
switchin 7
switchin_last 7
term_height 7
term_height_intern 7
warning0 7
decode_color 12
log10_2 12
error0 14
pari_sprint0 14
pari_get_histtime 21
printsep1 21
gp_readvec_stream 35
is_magic_ok 43
killallfiles 49
pari_is_file 58
print0_file 58
switchout_get_FILE 58
wr 58
wr_check 58
write0 58
gtolong_OK 77
is_dir_stat 84
pari_is_dir 84
pari_get_hist 91
wr_texnome 91
normalOutS 101
get_texvar 105
wr_lead_texnome 105
history 112
times_texnome 119
strtex 126
zerotostr 126
real0tostr_width_frac 155
texnome 175
texVpowE 182
texexpo 182
init_unique 279
pari_dir_exists 279
pari_is_rwx 279
pari_tmp_dir 279
pari_unique_dir 279
texi 280
err_printf 313
mat0n 378
texi_sign 427
printf0 518
env_ok 558
pari_printf 606
pari_vprintf 606
GENtoGENstr 693
GENtostr_fun 697
strprintf 721
printsep 798
term_color 802
real0tostr 1168
dopr_arg_vector 1239
str_alloc0 1501
pari_close_files 1542
pari_close_homedir 1542
initout 1552
pari_init_homedir 1552
pari_stdin_isatty 1552
resetout 1552
gsprintf 1603
v_get_arg 1638
print_precontext 1652
gvsprintf 1759
in_help 1801
fix_buffer 2128
stack_sprintf 2184
GENtostr_raw 2366
print_context 2366
pari_get_homedir 3088
gp_read_stream 3185
_expand_env 4695
_path_expand 4695
path_expand 4695
gp_read_stream_buf 4795
delete_buffer 4836
new_buffer 4836
wr_vecsmall 4993
pari_unlink 5821
init_filtre 6411
new_line 7954
out_printf 8509
filestate_restore 9099
zeros 9295
print_errcontext 9318
tmp_restore 9383
out_vprintf 9964
gp_filter 10777
Str 10787
RgV_to_str 10913
Str_fun 10913
str_print0 10985
quote_string 11781
pari_sprintf 13544
paren 14182
print_prefixed_text 14731
print1 17381
term_width 18104
term_width_intern 18104
GENtostr_unquoted 20104
absrtostr 21364
os_getenv 21781
pari_get_infile 22911
pari_fopengz 22974
pari_vsprintf 27451
normalErrF 28214
pari_fopen_or_fail 28302
pari_open_file 28302
sm_dopr 28690
fmtnum 36894
gen_output 40164
gen_output_fun 40164
matbruti 40175
absrtostr_width_frac 40291
get_sigd 40522
fmtreal 40550
shift_add 40977
pari_puts 41287
init_linewrap 41605
isdenom 46172
wr_dec 51185
pari_fclose 51227
newfile 51297
pari_kill_file 51297
out_term_color 51452
str_printf 52119
ex10 61648
term_get_color 61717
fmtstr 66176
str_putscut 66176
pari_add_hist 70672
pari_fread_chars 70931
dosign 76018
outpad 77409
pari_last_was_newline 80274
str_arg_vprintf 80809
get_var 81872
wr_lead_monome 82425
print 89283
filestate_save 96370
pari_set_last_newline 100745
input_loop 101010
print0 106678
out_print0 107504
pari_thread_close_files 113246
pari_init_files 113704
popinfile 114820
filestate_close 121601
wr_monome 128282
str_long 130528
str_ulong 130528
times_monome 135499
file_getline 140877
file_input 140877
filtre0 150073
pari_flush 154573
strlen_real 157695
get_fun 158657
pari_putc 164103
normalOutF 164168
monome 166880
VpowE 182427
wrexpo 182427
stack_GENtostr_fun 186157
_flush_log 192382
stack_GENtostr_fun_unquoted 224942
kill_file_stack 225412
isfactor 226730
str_init 230003
puts_lw 250742
normalErrS 256561
_fputs 256662
_puts_log 256662
itostr 308307
str_absint 438567
out_puts 449660
normalErrC 458488
str_alloc 465937
out_putc 624195
bruti_intern 762356
itostr_sign 807206
numdig 807206
bruti 916064
set_last_newline 1071183
bruti_sign 1092177
print_0_or_pm1 1092604
isone 1257763
utodec 1449954
str_puts 1611669
isnull_for_pol 1657558
isnull 3160033
putc_lw 7354119
normalOutC 7410922
_putc_log 7869410
str_putc 9245193

Generated by: LCOV version 1.13