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.18.0 lcov report (development 29644-f1a46412a2) Lines: 2052 2781 73.8 %
Date: 2024-10-12 09:06:38 Functions: 254 310 81.9 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
GENtoGENstr_nospace 0
GENtoTeXstr 0
_initout 0
blancs 0
brute 0
dbg 0
dbgGEN 0
dbg_addr 0
dbg_pari_heap 0
dbg_word 0
do_append 0
env_ok 0
err_flush 0
fputGEN_pariout 0
get_file 0
gp_embedded 0
gp_embedded_init 0
gp_read_from_input 0
gp_read_str_history 0
gp_read_str_multiline 0
init_unique 0
matbrute 0
ok_pipe 0
outmat 0
output 0
pari_ask_confirm 0
pari_dir_exists 0
pari_file_exists 0
pari_fopen 0
pari_fopen_or_fail 0
pari_fprintf 0
pari_get_histrtime 0
pari_get_histtime 0
pari_is_rwx 0
pari_nb_hist 0
pari_open_file 0
pari_safefopen 0
pari_tmp_dir 0
pari_unique_dir 0
pari_unique_filename 0
pari_unique_filename_suffix 0
pari_unlink 0
pari_vfprintf 0
print_coef 0
print_entree 0
print_functions_hash 0
prints 0
str_addr 0
string_gets 0
strip_last_nl 0
switchout 0
texe 0
texparen 0
try_dlopen 0
uordinal 0
vsigne 0
GENtostr 4
externstr 4
gp_fileextern 4
gp_readvec_file 4
gpextern 4
readstr 4
strftime_expand 4
writetex 4
printp 7
switchin_last 7
term_height 7
term_height_intern 7
warning0 7
_cfwrite 8
get_lines 8
gp_getenv 8
rdstr 8
try_pipe 8
write1 8
writeGEN 8
writenamedGEN 8
wrstr 8
check_magic 12
decode_color 12
gpwritebin 12
is_sizeoflong_ok 12
log10_2 12
readbin 12
strexpand 12
write_magic 12
writebin 12
error0 14
pari_sprint0 14
file_is_binary 16
rdGEN 16
wrGEN 16
gp_read_file 19
dft_help 20
forpath_init 20
forpath_next 20
gp_dlopen 20
gpinstall 20
install0 20
path_is_absolute 20
try_name 20
try_open 20
printsep1 21
is_long_ok 24
pari_histtime 25
switchin 27
gpsystem 28
readobj 28
check_compress 36
check_secure 40
printtex 42
gp_fileflush 44
gp_filewrite 48
killallfiles 49
gp_fileflush0 52
gp_fileopen 52
gp_filewrite1 52
is_dir_stat 55
pari_is_dir 55
get_free_gp_file 56
gp_fileclose 56
gp_filereadstr 56
new_gp_file 56
rd_long 56
gp_fileread 64
pari_fread_longs 72
gtolong_OK 77
is_magic_ok 79
wr_long 80
write0 82
pari_is_file 94
print0_file 94
switchout_get_FILE 94
wr 94
_lfwrite 96
_fwrite 104
get_texvar 105
wr_texnome 105
normalOutS 111
wr_lead_texnome 119
wr_check 122
strtex 126
zerotostr 126
times_texnome 140
texnome 203
texVpowE 210
texexpo 210
gp_readvec_stream 305
texi 319
check_gp_file 320
err_printf 347
mat0n 385
texi_sign 516
real0tostr_width_frac 661
term_color 709
strprintf 721
GENtoGENstr 728
GENtostr_fun 732
printf0 742
pari_printf 743
pari_vprintf 743
printsep 966
dopr_arg_vector 1463
real0tostr 1581
gsprintf 1603
pari_close_files 1841
pari_close_homedir 1841
initout 1851
pari_init_homedir 1851
pari_stdin_isatty 1851
resetout 1851
v_get_arg 1876
gvsprintf 1957
str_alloc0 2114
runaway_close 2158
in_help 2246
fix_buffer 3402
GENtostr_raw 3689
pari_get_homedir 3694
print_precontext 4613
print_context 5410
_expand_env 5672
_path_expand 5672
path_expand 5672
wr_vecsmall 6661
itostr 6797
new_line 7920
gp_read_stream 8439
delete_buffer 10771
new_buffer 10771
cxq_init 10899
gp_filter 11039
Str 11064
Str_fun 11190
RgV_to_str 11202
out_printf 11699
filestate_restore 12354
print_errcontext 12615
tmp_restore 12785
out_vprintf 13528
paren 14784
quote_string 14881
zeros 15117
print_prefixed_text 18018
pari_sprintf 18341
print1 19551
printfl_1 19551
out_print1 19579
term_width 22056
term_width_intern 22056
GENtostr_unquoted 25251
stack_GENtostr_fun_unquoted 25251
os_getenv 25793
absrtostr 34013
normalErrF 38357
pari_get_infile 39913
pari_fclose 39935
pari_fopengz 39956
newfile 40012
pari_kill_file 40012
stack_sprintf 41425
isdenom 52276
gen_output 58605
gen_output_fun 58605
pari_get_hist 58609
matbruti 58616
history 58659
pari_puts 60085
init_linewrap 60318
out_term_color 64806
stack_GENtostr_fun 69734
pari_vsprintf 75251
sm_dopr 76713
term_get_color 78780
get_var 93762
wr_lead_monome 94630
pari_add_hist 100996
pari_putc 102453
print 108518
printfl_0 108567
out_print0 109533
pari_fread_chars 112204
pari_last_was_newline 114049
filestate_save 137005
str_print0 140422
pari_set_last_newline 141361
absrtostr_width_frac 142722
get_sigd 143023
fmtreal 143107
shift_add 143464
fmtnum 144447
str_printf 148096
fmtstr 156187
str_putscut 156187
wr_dec 160030
strlen_real 170657
wr_monome 171304
times_monome 172865
str_long 175985
str_ulong 175985
ex10 176700
puts_lw 192249
pari_flush 195278
get_fun 199031
normalOutF 208324
monome 212405
str_arg_vprintf 224809
VpowE 227728
wrexpo 227728
print_gcoef 237319
_flush_log 246681
isfactor 274341
dosign 285601
outpad 287400
str_init 291772
normalErrS 299932
_fputs 300043
_puts_log 300043
pari_thread_close_files 323145
pari_init_files 324209
popinfile 324856
filestate_close 332617
out_puts 418007
str_absint 569164
normalErrC 590545
str_alloc 609659
kill_file_stack 641568
out_putc 694613
itostr_sign 750454
numdig 750454
gp_read_stream_buf 804141
init_filtre 806056
input_loop 940863
bruti_intern 968049
file_input 986780
file_getline 986856
filtre0 995661
set_last_newline 1109939
bruti 1129796
utodec 1131449
bruti_sign 1352767
print_0_or_pm1 1353283
isone 1564191
isnull_for_pol 1729802
str_puts 2434874
isnull 3558009
putc_lw 9681376
normalOutC 9757558
_putc_log 10348103
str_putc 15083224

Generated by: LCOV version 1.16