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 20704-afbaa81) Lines: 1801 2530 71.2 %
Date: 2017-05-26 05:56:59 Functions: 247 292 84.6 %
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 0
GENtostr_fun 693
GENtostr_raw 2268
GENtostr_unquoted 14245
RgV_to_str 10187
Str 10161
Str_fun 10175
Strchr 21
Strexpand 12
Strprintf 721
Strtex 14
VpowE 150854
_cfwrite 8
_expand_env 4512
_flush_log 168267
_fputs 238696
_fwrite 80
_initout 0
_lfwrite 72
_path_expand 4512
_putc_log 6648163
_puts_log 238696
absrtostr 16247
absrtostr_width_frac 13015
blancs 0
brute 0
bruti 739188
bruti_intern 616789
bruti_sign 875940
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 4709
dft_help 8
do_append 0
dopr_arg_vector 1239
dosign 63926
eng_ord 0
env_ok 680
err_flush 7
err_printf 253
error0 14
ex10 29255
externstr 4
file_getline 117292
file_input 117264
file_is_binary 12
filestate_restore 7983
filtre0 125860
fix_buffer 2030
fmtnum 51146
fmtreal 13274
fmtstr 53872
forpath_init 16
forpath_next 16
fputGEN_pariout 0
gen_output 30931
gen_output_fun 30931
get_file 0
get_fun 139591
get_lines 8
get_sigd 13246
get_texvar 98
get_var 62507
gp_dlopen 8
gp_embedded 0
gp_embedded_init 0
gp_filter 10108
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 4419
gp_readvec_file 4
gp_readvec_stream 32
gpextern 4
gpinstall 8
gpsystem 24
gpwritebin 8
gsprintf 14
gvsprintf 125
history 116
in_help 1511
init_filtre 5969
init_linewrap 32294
init_unique 340
initout 1481
input_loop 81747
install0 8
is_dir_stat 86
is_long_ok 16
is_magic_ok 32
is_sizeoflong_ok 8
isdenom 32473
isfactor 172939
isnull 2784508
isnull_for_pol 1606112
isone 1003619
itoc 7
itostr 690440
itostr_sign 1067982
kill_file_stack 64123
killallfiles 49
lim_lines_output 0
log10_2 12
ltoc 1876
matbrute 0
matbruti 30938
monome 131415
new_buffer 4709
new_line 7995
newfile 58123
normalErrC 404803
normalErrF 24071
normalErrS 238658
normalOutC 6243360
normalOutF 144196
normalOutS 38
numdig 1067982
ok_pipe 0
os_getenv 19238
out_print0 98423
out_printf 7249
out_putc 557027
out_puts 405594
out_term_color 45800
out_vprintf 8532
outmat 0
outpad 64385
output 0
paren 8554
pari_add_hist 55837
pari_ask_confirm 0
pari_close_files 1480
pari_close_homedir 1480
pari_dir_exists 340
pari_fclose 58053
pari_file_exists 0
pari_flush 136010
pari_fopen 0
pari_fopen_or_fail 35181
pari_fopengz 22841
pari_fprintf 0
pari_fread_chars 70939
pari_fread_longs 56
pari_get_hist 91
pari_get_histtime 25
pari_get_homedir 2968
pari_get_infile 22850
pari_init_files 31808
pari_init_homedir 1481
pari_is_dir 86
pari_is_file 36
pari_is_rwx 340
pari_kill_file 58123
pari_last_tmp_file 85553
pari_last_was_newline 64030
pari_nb_hist 0
pari_open_file 35181
pari_printf 578
pari_putc 150729
pari_puts 32019
pari_safefopen 0
pari_set_last_newline 81839
pari_sprint0 14
pari_sprintf 12746
pari_stdin_isatty 1481
pari_strdup 28364
pari_strndup 0
pari_thread_close_files 32026
pari_tmp_dir 340
pari_unique_dir 340
pari_unique_filename 0
pari_unique_filename_suffix 0
pari_unlink 7160
pari_vfprintf 0
pari_vprintf 578
pari_vsprintf 22748
path_expand 4512
path_is_absolute 16
popinfile 33542
print 85326
print0 97660
print0_file 36
print1 12320
print_0_or_pm1 876134
print_context 2247
print_entree 0
print_errcontext 7972
print_functions_hash 0
print_precontext 1582
print_prefixed_text 13373
printf0 518
printp 7
prints 490
printsep 735
printsep1 21
printtex 7
putc_lw 6196543
puts_lw 217730
quote_string 10470
rdGEN 12
rd_long 44
rdstr 8
readbin 8
readobj 20
readstr 4
real0tostr 937
real0tostr_width_frac 12580
resetout 1481
set_last_newline 959961
shift_add 13694
sm_dopr 23987
stack_GENtostr_fun 160298
stack_GENtostr_fun_unquoted 195679
stack_sprintf 1345
stack_strcat 1190
stack_strdup 1345
str_absint 361797
str_addr 0
str_alloc 384078
str_alloc0 1113
str_arg_vprintf 51184
str_init 197457
str_long 110849
str_print0 10237
str_printf 27197
str_putc 7206007
str_puts 1331028
str_putscut 53872
str_ulong 110849
strftime_expand 0
string_gets 0
strlen_real 152070
switchin 23
switchin_last 7
switchout 0
switchout_get_FILE 36
term_color 660
term_get_color 54495
term_height 7
term_height_intern 7
term_width 15569
term_width_intern 15569
texVpowE 140
texe 0
texexpo 140
texi 60
texi_sign 194
texnome 140
texparen 0
times_monome 106764
times_texnome 112
try_dlopen 0
try_name 16
try_open 16
try_pipe 8
type_name 33385
utodec 2146459
v_get_arg 1638
vsigne 0
warning0 7
wr 36
wrGEN 12
wr_check 44
wr_dec 9090
wr_lead_monome 62885
wr_lead_texnome 98
wr_long 60
wr_monome 101920
wr_texnome 70
wr_vecsmall 3359
wrexpo 150854
write0 24
write1 8
writeGEN 4
write_magic 8
writebin 8
writenamedGEN 8
writetex 4
wrstr 8
zeros 19228
zerotostr 21

Generated by: LCOV version 1.11