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 18603-5baf4f6) Lines: 1540 2534 60.8 %
Date: 2016-02-11 Functions: 201 290 69.3 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 966 1906 50.7 %

Function Name Sort by function name Hit count Sort by hit count
GENtoGENstr 693
GENtoGENstr_nospace 0
GENtoTeXstr 0
GENtostr 0
GENtostr1 23443
GENtostr_aux 147623
GENtostr_fun 46711
GENtostr_fun_unquoted 151069
GENtostr_unquoted 4155
RgV_to_str 0
RgV_to_str_fun 10143
Str 10129
Str_fun 10143
Strchr 7
Strexpand 0
Strprintf 721
Strtex 14
VpowE 146174
_cfwrite 0
_expand_env 6990
_flush_log 407601
_fputs 895775
_fwrite 0
_initout 0
_lfwrite 0
_path_expand 6990
_putc_log 16321485
_puts_log 895775
absrtostr 14782
absrtostr_width_frac 315
blancs 0
brute 0
bruti 808435
bruti_intern 580961
bruti_sign 965151
check_magic 0
check_secure 0
dbg 0
dbgGEN 0
dbg_addr 0
dbg_pari_heap 0
dbg_word 0
decode_color 0
delete_buffer 4300
delete_dirs 5974
dft_help 7
do_append 0
dopr_arg_vector 1260
dosign 5227
eng_ord 0
env_ok 614
err_flush 7
err_printf 245
error0 14
ex10 15090
externstr 0
file_getline 166133
file_input 166133
file_is_binary 0
filestate_restore 58106
filtre0 174398
fix_buffer 1897
fmtnum 4898
fmtreal 602
fmtstr 196516
forpath_init 0
forpath_next 0
fputGEN_pariout 0
gen_output 25410
gen_output_fun 25410
get_file 0
get_fun 102237
get_lines 0
get_sigd 574
get_texvar 98
get_var 59234
gp_dlopen 7
gp_expand_path 2330
gp_filter 10108
gp_getenv 0
gp_read_file 7
gp_read_from_input 0
gp_read_str_multiline 0
gp_read_stream 2401
gp_read_stream_buf 3367
gp_readvec_file 0
gp_readvec_stream 21
gpextern 0
gpinstall 7
gpsystem 0
gpwritebin 0
gsprintf 14
gvsprintf 21572
history 112
in_help 1255
init_filtre 5753
init_linewrap 27671
init_unique 307
initout 2330
input_loop 141274
install0 7
is_dir_stat 56
is_long_ok 0
is_magic_ok 0
is_sizeoflong_ok 0
isdenom 41293
isfactor 200858
isnull 2881023
isnull_for_pol 1604106
isone 997339
itoc 0
itostr 347765
itostr_sign 707376
kill_file_stack 3679
killallfiles 1857
lim_lines_output 0
log10_2 12
ltoc 84
matbrute 0
matbruti 25410
monome 141379
new_buffer 4808
new_line 8148
newfile 53054
normalErrC 2178896
normalErrF 174465
normalErrS 895762
normalOutC 14142589
normalOutF 233136
normalOutS 13
numdig 707376
ok_pipe 0
os_getenv 70877
os_signal 23090
out_print0 76813
out_printf 54976
out_putc 8106298
out_puts 866572
out_term_color 246361
out_vprintf 70202
outmat 0
outpad 5472
output 0
paren 7567
pari_add_hist 61082
pari_ask_confirm 0
pari_close_files 1822
pari_close_homedir 1822
pari_default_path 2330
pari_dir_exists 307
pari_fclose 53019
pari_file_exists 0
pari_flush 174848
pari_fopen 0
pari_fopen_or_fail 30885
pari_fopengz 22120
pari_fprintf 0
pari_fread_chars 70931
pari_fread_longs 0
pari_get_hist 91
pari_get_histtime 21
pari_get_homedir 4660
pari_get_infile 22113
pari_init_files 5780
pari_init_homedir 2330
pari_is_dir 56
pari_is_file 0
pari_is_rwx 307
pari_kill_file 53054
pari_last_tmp_file 196104
pari_last_was_newline 119377
pari_nb_hist 0
pari_open_file 30885
pari_printf 14617
pari_putc 5926079
pari_puts 107467
pari_safefopen 0
pari_set_last_newline 208157
pari_sprint0 14
pari_sprintf 63083
pari_stdin_isatty 2330
pari_strdup 100339
pari_strndup 0
pari_tmp_dir 307
pari_unique_dir 307
pari_unique_filename 0
pari_unlink 6329
pari_vfprintf 0
pari_vprintf 14617
pari_vsprintf 64378
path_expand 6990
path_is_absolute 0
popinfile 3644
print 72564
print0 76078
print0_file 0
print1 3507
print_0_or_pm1 965333
print_context 1393
print_entree 0
print_errcontext 58113
print_functions_hash 0
print_precontext 1022
print_prefixed_text 63580
printf0 539
prints 490
printsep 707
printsep1 21
printtex 7
putc_lw 14080257
puts_lw 272352
quote_string 10955
rdGEN 0
rd_long 0
rdstr 0
readbin 0
readobj 0
readstr 0
real0tostr 868
real0tostr_width_frac 35
resetout 2330
set_last_newline 8970175
shift_add 1015
sm_dopr 157412
stack_sprintf 1295
stack_strcat 1015
stack_strdup 1295
str_absint 345417
str_addr 0
str_alloc 362607
str_alloc0 1068
str_init 307058
str_long 101212
str_print0 14
str_putc 10744704
str_puts 1464694
str_putscut 196516
str_ulong 101212
strftime_expand 0
string_gets 0
strlen_real 357688
switchin 7
switchin_last 7
switchout 0
switchout_get_FILE 0
term_color 532
term_get_color 308624
term_height 7
term_height_intern 7
term_width 65596
term_width_intern 65596
texVpowE 140
texe 0
texexpo 140
texi 56
texi_sign 182
texnome 140
texparen 0
times_monome 117782
times_texnome 112
try_dlopen 0
try_name 0
try_open 0
try_pipe 0
type_name 52139
utodec 1423082
v_get_arg 1743
vsigne 0
warning0 7
wr 0
wrGEN 0
wr_check 0
wr_dec 8244
wr_lead_monome 59703
wr_lead_texnome 98
wr_long 0
wr_monome 114359
wr_texnome 70
wr_vecsmall 2095
wrexpo 146174
write0 0
write1 0
writeGEN 0
write_magic 0
writebin 0
writenamedGEN 0
writetex 0
wrstr 0
zeros 5978
zerotostr 21

Generated by: LCOV version 1.9