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.2 lcov report (development 29115-f22e516b23) Lines: 2069 2774 74.6 %
Date: 2024-04-19 08:07:09 Functions: 255 310 82.3 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
GENtoGENstr 728
GENtoGENstr_nospace 0
GENtoTeXstr 0
GENtostr 4
GENtostr_fun 732
GENtostr_raw 3668
GENtostr_unquoted 25126
RgV_to_str 11202
Str 11064
Str_fun 11190
VpowE 223042
_cfwrite 8
_expand_env 5609
_flush_log 244754
_fputs 298903
_fwrite 104
_initout 0
_lfwrite 96
_path_expand 5609
_putc_log 10228760
_puts_log 298903
absrtostr 33079
absrtostr_width_frac 127910
blancs 0
brute 0
bruti 1121988
bruti_intern 958405
bruti_sign 1342419
check_compress 36
check_gp_file 320
check_magic 12
check_secure 40
cxq_init 10616
dbg 0
dbgGEN 0
dbg_addr 0
dbg_pari_heap 0
dbg_word 0
decode_color 12
delete_buffer 10743
dft_help 20
do_append 0
dopr_arg_vector 1463
dosign 270719
env_ok 0
err_flush 0
err_printf 347
error0 14
ex10 160954
externstr 4
file_getline 984378
file_input 984302
file_is_binary 16
filestate_close 326711
filestate_restore 12229
filestate_save 134905
filtre0 993204
fix_buffer 3339
fmtnum 144361
fmtreal 128295
fmtstr 155057
forpath_init 20
forpath_next 20
fputGEN_pariout 0
gen_output 57764
gen_output_fun 57764
get_file 0
get_free_gp_file 56
get_fun 197644
get_lines 8
get_sigd 128211
get_texvar 105
get_var 92817
gp_dlopen 20
gp_embedded 0
gp_embedded_init 0
gp_fileclose 56
gp_fileextern 4
gp_fileflush 44
gp_fileflush0 52
gp_fileopen 52
gp_fileread 64
gp_filereadstr 56
gp_filewrite 48
gp_filewrite1 52
gp_filter 11039
gp_getenv 8
gp_read_file 19
gp_read_from_input 0
gp_read_str_multiline 0
gp_read_stream 8432
gp_read_stream_buf 804134
gp_readvec_file 4
gp_readvec_stream 305
gpextern 4
gpinstall 20
gpsystem 28
gpwritebin 12
gsprintf 1603
gtolong_OK 77
gvsprintf 1951
history 141
in_help 2218
init_filtre 806028
init_linewrap 59456
init_unique 0
initout 1830
input_loop 938770
install0 20
is_dir_stat 55
is_long_ok 24
is_magic_ok 79
is_sizeoflong_ok 12
isdenom 52136
isfactor 271727
isnull 3540383
isnull_for_pol 1721843
isone 1550713
itostr 6559
itostr_sign 728013
kill_file_stack 630010
killallfiles 49
lim_lines_output 2
log10_2 12
mat0n 385
matbrute 0
matbruti 57775
monome 210232
new_buffer 10743
new_gp_file 56
new_line 7920
newfile 40005
normalErrC 587991
normalErrF 37990
normalErrS 298782
normalOutC 9640769
normalOutF 206764
normalOutS 121
numdig 728013
ok_pipe 0
os_getenv 25634
out_print0 108987
out_print1 19579
out_printf 11610
out_putc 691256
out_puts 416029
out_term_color 64382
out_vprintf 13425
outmat 0
outpad 272502
output 0
paren 14602
pari_add_hist 99581
pari_ask_confirm 0
pari_close_files 1820
pari_close_homedir 1820
pari_dir_exists 0
pari_fclose 39928
pari_file_exists 0
pari_flush 193821
pari_fopen 0
pari_fopen_or_fail 0
pari_fopengz 39949
pari_fprintf 0
pari_fread_chars 112204
pari_fread_longs 72
pari_get_hist 91
pari_get_histrtime 0
pari_get_histtime 0
pari_get_homedir 3652
pari_get_infile 39906
pari_histtime 25
pari_init_files 317977
pari_init_homedir 1830
pari_is_dir 55
pari_is_file 94
pari_is_rwx 0
pari_kill_file 40005
pari_last_was_newline 112531
pari_nb_hist 0
pari_open_file 0
pari_printf 743
pari_putc 101650
pari_puts 59244
pari_safefopen 0
pari_set_last_newline 139224
pari_sprint0 14
pari_sprintf 18223
pari_stdin_isatty 1830
pari_thread_close_files 317195
pari_tmp_dir 0
pari_unique_dir 0
pari_unique_filename 0
pari_unique_filename_suffix 0
pari_unlink 0
pari_vfprintf 0
pari_vprintf 743
pari_vsprintf 74996
path_expand 5609
path_is_absolute 20
popinfile 318794
print 107972
print0_file 94
print1 19551
print_0_or_pm1 1342935
print_coef 0
print_context 5417
print_entree 0
print_errcontext 12519
print_functions_hash 0
print_gcoef 235576
print_precontext 4613
print_prefixed_text 17922
printf0 742
printfl_0 108021
printfl_1 19551
printp 7
prints 0
printsep 966
printsep1 21
printtex 42
putc_lw 9565736
puts_lw 190862
quote_string 14776
rdGEN 16
rd_long 56
rdstr 8
readbin 12
readobj 28
readstr 4
real0tostr 1581
real0tostr_width_frac 661
resetout 1830
runaway_close 2137
set_last_newline 1104606
shift_add 128652
sm_dopr 76459
stack_GENtostr_fun 68795
stack_GENtostr_fun_unquoted 25126
stack_sprintf 41397
str_absint 562707
str_addr 0
str_alloc 602030
str_alloc0 2008
str_arg_vprintf 210869
str_init 290001
str_long 172065
str_print0 139876
str_printf 134411
str_putc 14824320
str_puts 2392368
str_putscut 155057
str_ulong 172065
strexpand 12
strftime_expand 4
string_gets 0
strip_last_nl 0
strlen_real 170521
strprintf 721
strtex 126
switchin 27
switchin_last 7
switchout 0
switchout_get_FILE 94
term_color 719
term_get_color 78281
term_height 7
term_height_intern 7
term_width 21939
term_width_intern 21939
texVpowE 210
texe 0
texexpo 210
texi 319
texi_sign 516
texnome 203
texparen 0
times_monome 170552
times_texnome 140
tmp_restore 12646
try_dlopen 0
try_name 20
try_open 20
try_pipe 8
uordinal 0
utodec 1104437
v_get_arg 1876
vsigne 0
warning0 7
wr 94
wrGEN 16
wr_check 122
wr_dec 144678
wr_lead_monome 93685
wr_lead_texnome 119
wr_long 80
wr_monome 169355
wr_texnome 105
wr_vecsmall 6661
wrexpo 223042
write0 82
write1 8
writeGEN 8
write_magic 12
writebin 12
writenamedGEN 8
writetex 4
wrstr 8
zeros 14723
zerotostr 126

Generated by: LCOV version 1.14