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 17110-9967e23) Lines: 1804 2489 72.5 %
Date: 2014-11-26 Functions: 241 286 84.3 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 1066 1884 56.6 %

Function Name Sort by function name Hit count Sort by hit count
GENtoGENstr 495
GENtoGENstr_nospace 0
GENtoTeXstr 0
GENtostr 0
GENtostr1 16327
GENtostr_aux 88145
GENtostr_fun 25959
GENtostr_fun_unquoted 87554
GENtostr_unquoted 4503
RgV_to_str 0
RgV_to_str_fun 7042
Str 7020
Str_fun 7030
Strchr 5
Strexpand 12
Strprintf 515
Strtex 10
VpowE 89420
_cfwrite 12
_expand_env 2912
_flush_log 106244
_fputs 147561
_fwrite 120
_initout 0
_lfwrite 108
_path_expand 2912
_putc_log 4411742
_puts_log 147561
absrtostr 8350
absrtostr_width_frac 185
blancs 0
brute 0
bruti 364533
bruti_intern 357578
bruti_sign 456698
check_magic 8
check_secure 20
dbg 0
dbgGEN 0
dbg_addr 0
dbg_pari_heap 0
dbg_word 0
decode_color 0
delete_buffer 2652
delete_dirs 1864
dft_help 5
do_append 0
dopr_arg_vector 915
dosign 2883
eng_ord 0
env_ok 770
err_flush 0
err_printf 12
error0 10
ex10 8530
externstr 0
file_getline 47968
file_input 47948
file_is_binary 12
filestate_restore 3944
filtre0 54040
fix_buffer 1230
fmtnum 2603
fmtreal 430
fmtstr 33441
forpath_init 16
forpath_next 16
fputGEN_pariout 0
gen_output 13915
gen_output_fun 13915
get_file 0
get_fun 60201
get_lines 4
get_sigd 410
get_texvar 70
get_var 36135
gp_dlopen 5
gp_expand_path 948
gp_filter 6995
gp_getenv 8
gp_read_file 13
gp_read_stream 1705
gp_read_stream_buf 2407
gp_readvec_file 4
gp_readvec_stream 19
gpextern 0
gpinstall 5
gpsystem 20
gpwritebin 8
gsprintf 10
gvsprintf 55
history 80
in_help 490
init_filtre 3395
init_linewrap 14806
init_unique 385
initout 948
input_loop 38083
install0 5
is_dir_stat 36
is_long_ok 16
is_magic_ok 32
is_sizeoflong_ok 8
isdenom 23600
isfactor 118974
isnull 1781254
isone 593315
itoc 0
itostr 190540
itostr_sign 413435
kill_file_stack 1857
killallfiles 941
lim_lines_output 0
log10_2 8
ltoc 60
matbrute 0
matbruti 14267
monome 85835
new_buffer 2716
new_line 5770
newfile 56756
normalErrC 215762
normalErrF 11822
normalErrS 147544
normalOutC 4195980
normalOutF 94422
normalOutS 17
numdig 413435
ok_pipe 0
os_getenv 11795
os_signal 10268
out_print0 46244
out_printf 3534
out_putc 367944
out_puts 220911
out_term_color 25581
out_vprintf 4237
outmat 0
outpad 3013
output 0
paren 5180
pari_add_hist 25490
pari_ask_confirm 0
pari_close_files 916
pari_close_homedir 916
pari_default_path 948
pari_dir_exists 385
pari_fclose 56731
pari_file_exists 0
pari_flush 90423
pari_fopen 0
pari_fopen_or_fail 40915
pari_fopengz 15790
pari_fprintf 0
pari_fread_chars 50677
pari_fread_longs 92
pari_get_hist 65
pari_get_histtime 15
pari_get_homedir 1904
pari_get_infile 15801
pari_init_files 948
pari_init_homedir 948
pari_is_dir 36
pari_is_file 32
pari_is_rwx 385
pari_kill_file 56756
pari_last_tmp_file 39645
pari_last_was_newline 29494
pari_nb_hist 0
pari_open_file 40915
pari_printf 546
pari_putc 151282
pari_puts 15690
pari_safefopen 0
pari_set_last_newline 40028
pari_sprint0 10
pari_sprintf 7514
pari_stdin_isatty 948
pari_strdup 25448
pari_strndup 0
pari_tmp_dir 385
pari_unique_dir 385
pari_unique_filename 0
pari_unlink 8391
pari_vfprintf 0
pari_vprintf 546
pari_vsprintf 8424
path_expand 2912
path_is_absolute 16
popinfile 1816
print 43649
print0 46114
print0_file 32
print1 2460
print_0_or_pm1 456840
print_context 799
print_entree 0
print_errcontext 3979
print_functions_hash 0
print_precontext 640
print_prefixed_text 7849
printf0 400
prints 350
printsep 115
printsep1 10
printtex 5
putc_lw 4160703
puts_lw 100845
quote_string 7808
rdGEN 20
rd_long 72
rdstr 12
readbin 8
readobj 28
readstr 4
real0tostr 534
real0tostr_width_frac 25
resetout 948
set_last_newline 586940
shift_add 875
sm_dopr 13631
stack_sprintf 910
stack_strcat 700
stack_strdup 910
str_absint 214919
str_addr 0
str_alloc 224864
str_alloc0 610
str_init 103068
str_long 61585
str_print0 42
str_putc 4435139
str_puts 670859
str_putscut 33441
str_ulong 61585
strftime_expand 0
strlen_real 101761
switchin 21
switchin_last 5
switchout 0
switchout_get_FILE 32
term_color 370
term_get_color 29895
term_height 5
term_height_intern 5
term_width 9104
term_width_intern 9104
texVpowE 100
texe 0
texexpo 100
texi 44
texi_sign 142
texnome 100
texparen 0
times_monome 70255
times_texnome 80
try_dlopen 0
try_name 16
try_open 16
try_pipe 0
type_name 17016
utodec 824309
v_get_arg 1335
vsigne 0
warning0 5
wr 32
wrGEN 20
wr_check 40
wr_dec 4400
wr_lead_monome 36480
wr_lead_texnome 70
wr_long 88
wr_monome 68645
wr_texnome 50
wr_vecsmall 1350
wrexpo 89420
write0 20
write1 8
writeGEN 4
write_magic 8
writebin 8
writenamedGEN 12
writetex 4
wrstr 12
zeros 3596
zerotostr 15

Generated by: LCOV version 1.9