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.10.0 lcov report (development 22344-f2bf0a3) Lines: 1922 2670 72.0 %
Date: 2018-04-25 06:16:49 Functions: 262 308 85.1 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
GENtoGENstr 693
GENtoGENstr_nospace 0
GENtoTeXstr 0
GENtostr 7
GENtostr_fun 700
GENtostr_raw 2415
GENtostr_unquoted 18930
RgV_to_str 10845
Str 10819
Str_fun 10833
Strchr 21
Strexpand 12
Strprintf 721
Strtex 14
VpowE 177839
_cfwrite 8
_expand_env 4829
_flush_log 185434
_fputs 250674
_fwrite 80
_initout 0
_lfwrite 72
_path_expand 4829
_putc_log 7539997
_puts_log 250674
absrtostr 19950
absrtostr_width_frac 40277
blancs 0
brute 0
bruti 877903
bruti_intern 733129
bruti_sign 1049515
check_compress 36
check_gp_file 308
check_magic 8
check_secure 32
dbg 0
dbgGEN 0
dbg_addr 0
dbg_pari_heap 0
dbg_word 0
decode_color 0
delete_buffer 4896
dft_help 8
do_append 0
dopr_arg_vector 1239
dosign 75687
env_ok 582
err_flush 7
err_printf 253
error0 14
ex10 60220
externstr 4
file_getline 134237
file_input 134161
file_is_binary 12
filestate_close 99230
filestate_restore 8621
filestate_save 90564
filtre0 143371
fix_buffer 2121
fmtnum 35901
fmtreal 40536
fmtstr 63479
forpath_init 16
forpath_next 16
fputGEN_pariout 0
gen_output 37378
gen_output_fun 37378
get_file 0
get_free_gp_file 52
get_fun 153709
get_lines 8
get_sigd 40508
get_texvar 98
get_var 79146
gp_dlopen 8
gp_embedded 0
gp_embedded_init 0
gp_fileclose 52
gp_fileextern 0
gp_fileflush 44
gp_fileflush0 52
gp_fileopen 52
gp_fileread 56
gp_filereadstr 56
gp_filewrite 48
gp_filewrite1 52
gp_filter 10817
gp_getenv 8
gp_read_file 15
gp_read_from_input 0
gp_read_str_multiline 0
gp_read_stream 3119
gp_read_stream_buf 4789
gp_readvec_file 4
gp_readvec_stream 39
gpextern 4
gpinstall 8
gpsystem 24
gpwritebin 8
gsprintf 1603
gvsprintf 1763
history 116
in_help 1770
init_filtre 6423
init_linewrap 38825
init_unique 291
initout 1566
input_loop 95048
install0 8
is_dir_stat 86
is_long_ok 16
is_magic_ok 75
is_sizeoflong_ok 8
isdenom 44884
isfactor 221372
isnull 3097572
isnull_for_pol 1652389
isone 1210188
itoc 7
itostr 637356
itostr_sign 1121078
kill_file_stack 181279
killallfiles 49
lim_lines_output 0
log10_2 12
ltoc 1876
matbrute 0
matbruti 37392
monome 162285
new_buffer 4896
new_gp_file 52
new_line 8009
newfile 52475
normalErrC 441389
normalErrF 26718
normalErrS 250631
normalOutC 7098608
normalOutF 158716
normalOutS 43
numdig 1121078
ok_pipe 0
os_getenv 21077
out_print0 105371
out_printf 8052
out_putc 602185
out_puts 434688
out_term_color 49334
out_vprintf 9412
outmat 0
outpad 76402
output 0
paren 13706
pari_add_hist 66026
pari_ask_confirm 0
pari_close_files 1564
pari_close_homedir 1564
pari_dir_exists 291
pari_fclose 52405
pari_file_exists 0
pari_flush 149629
pari_fopen 0
pari_fopen_or_fail 29526
pari_fopengz 22904
pari_fprintf 0
pari_fread_chars 70939
pari_fread_longs 56
pari_get_hist 91
pari_get_histtime 25
pari_get_homedir 3136
pari_get_infile 22857
pari_init_files 90159
pari_init_homedir 1566
pari_is_dir 86
pari_is_file 94
pari_is_rwx 291
pari_kill_file 52475
pari_last_was_newline 75120
pari_nb_hist 0
pari_open_file 29526
pari_printf 599
pari_putc 159301
pari_puts 38471
pari_safefopen 0
pari_set_last_newline 94910
pari_sprint0 14
pari_sprintf 13815
pari_stdin_isatty 1566
pari_strdup 30322
pari_strndup 0
pari_thread_close_files 90670
pari_tmp_dir 291
pari_unique_dir 291
pari_unique_filename 0
pari_unique_filename_suffix 0
pari_unlink 6049
pari_vfprintf 0
pari_vprintf 599
pari_vsprintf 26391
path_expand 4829
path_is_absolute 16
popinfile 92264
print 87346
print0 104580
print0_file 94
print1 17220
print_0_or_pm1 1049709
print_context 2296
print_entree 0
print_errcontext 8838
print_functions_hash 0
print_precontext 1631
print_prefixed_text 14239
printf0 518
printp 7
prints 490
printsep 763
printsep1 21
printtex 7
putc_lw 7044455
puts_lw 239190
quote_string 11618
rdGEN 12
rd_long 44
rdstr 8
readbin 8
readobj 20
readstr 4
real0tostr 965
real0tostr_width_frac 155
resetout 1566
set_last_newline 1034199
shift_add 40963
sm_dopr 27630
stack_GENtostr_fun 177241
stack_GENtostr_fun_unquoted 215300
stack_sprintf 1401
stack_strcat 1197
stack_strdup 1401
str_absint 424615
str_addr 0
str_alloc 450340
str_alloc0 1438
str_arg_vprintf 77425
str_init 219732
str_long 127684
str_print0 10953
str_printf 49795
str_putc 8825277
str_puts 1561322
str_putscut 63479
str_ulong 127684
strftime_expand 0
string_gets 0
strip_last_nl 0
strlen_real 156116
switchin 23
switchin_last 7
switchout 0
switchout_get_FILE 94
term_color 660
term_get_color 59029
term_height 7
term_height_intern 7
term_width 17336
term_width_intern 17336
texVpowE 140
texe 0
texexpo 140
texi 60
texi_sign 194
texnome 140
texparen 0
times_monome 132293
times_texnome 112
tmp_restore 8891
try_dlopen 0
try_name 16
try_open 16
try_pipe 8
type_name 34131
uordinal 0
utodec 2162603
v_get_arg 1638
vsigne 0
warning0 7
wr 94
wrGEN 12
wr_check 102
wr_dec 50534
wr_lead_monome 79790
wr_lead_texnome 98
wr_long 60
wr_monome 125104
wr_texnome 70
wr_vecsmall 4486
wrexpo 177839
write0 82
write1 8
writeGEN 4
write_magic 8
writebin 8
writenamedGEN 8
writetex 4
wrstr 8
zeros 8721
zerotostr 35

Generated by: LCOV version 1.11