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.16.1 lcov report (development 28697-a4113027d0) Lines: 2069 2774 74.6 %
Date: 2023-09-28 07:47:45 Functions: 255 310 82.3 %
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_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
lim_lines_output 2
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_get_hist 91
pari_is_file 94
print0_file 94
switchout_get_FILE 94
wr 94
_lfwrite 96
_fwrite 104
get_texvar 105
wr_texnome 105
wr_lead_texnome 119
normalOutS 121
wr_check 122
strtex 126
zerotostr 126
times_texnome 140
history 141
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 719
strprintf 721
GENtoGENstr 728
GENtostr_fun 732
printf0 742
pari_printf 743
pari_vprintf 743
printsep 966
print_precontext 1029
dopr_arg_vector 1463
real0tostr 1581
gsprintf 1603
pari_close_files 1799
pari_close_homedir 1799
initout 1809
pari_init_homedir 1809
pari_stdin_isatty 1809
resetout 1809
print_context 1833
v_get_arg 1876
gvsprintf 1923
str_alloc0 1980
runaway_close 2116
in_help 2176
GENtostr_raw 2548
fix_buffer 3220
pari_get_homedir 3610
_expand_env 5546
_path_expand 5546
path_expand 5546
itostr 6545
wr_vecsmall 6619
new_line 7962
gp_read_stream 8418
cxq_init 10276
delete_buffer 10708
new_buffer 10708
Str 10798
gp_filter 10836
Str_fun 10924
RgV_to_str 10936
out_printf 11426
filestate_restore 12053
print_errcontext 12307
tmp_restore 12438
out_vprintf 13202
quote_string 13628
paren 14588
zeros 14620
pari_sprintf 16955
print_prefixed_text 17710
print1 19530
printfl_1 19530
out_print1 19558
term_width 21741
term_width_intern 21741
GENtostr_unquoted 23542
stack_GENtostr_fun_unquoted 23542
os_getenv 25394
absrtostr 32690
normalErrF 37348
pari_get_infile 39892
pari_fclose 39914
pari_fopengz 39935
newfile 39991
pari_kill_file 39991
stack_sprintf 41383
isdenom 50666
gen_output 57068
gen_output_fun 57068
matbruti 57079
pari_puts 58548
init_linewrap 58739
out_term_color 63492
stack_GENtostr_fun 66748
pari_vsprintf 73463
sm_dopr 74926
term_get_color 77141
get_var 86496
wr_lead_monome 87147
pari_add_hist 98052
pari_putc 100918
print 105837
printfl_0 105886
out_print0 106852
pari_last_was_newline 110751
pari_fread_chars 112204
absrtostr_width_frac 127878
get_sigd 128179
fmtreal 128263
shift_add 128620
filestate_save 132828
str_printf 134411
pari_set_last_newline 137196
str_print0 137454
fmtnum 144315
wr_dec 144360
fmtstr 151645
str_putscut 151645
ex10 160533
wr_monome 165711
times_monome 167412
str_long 168719
str_ulong 168719
strlen_real 170279
puts_lw 188010
pari_flush 190965
get_fun 194526
monome 202633
normalOutF 203657
str_arg_vprintf 209336
VpowE 216325
wrexpo 216325
print_gcoef 235338
_flush_log 241005
isfactor 265479
dosign 270673
outpad 272424
str_init 284013
normalErrS 296590
_fputs 296711
_puts_log 296711
pari_thread_close_files 319245
pari_init_files 320311
popinfile 320771
filestate_close 328207
out_puts 412023
str_absint 560625
normalErrC 579232
str_alloc 599545
kill_file_stack 633411
out_putc 681765
itostr_sign 725496
numdig 725496
gp_read_stream_buf 804120
init_filtre 805993
input_loop 936711
bruti_intern 941352
file_input 981746
file_getline 981822
filtre0 990466
set_last_newline 1091109
utodec 1096498
bruti 1106888
bruti_sign 1322593
print_0_or_pm1 1323109
isone 1516384
isnull_for_pol 1704385
str_puts 2354450
isnull 3478562
putc_lw 9336674
normalOutC 9409581
_putc_log 9988813
str_putc 14513994

Generated by: LCOV version 1.14