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 29806-4d001396c7) Lines: 2054 2783 73.8 %
Date: 2024-12-22 09:08:28 Functions: 254 310 81.9 %
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 3703
GENtostr_unquoted 25748
RgV_to_str 11202
Str 11064
Str_fun 11190
VpowE 231417
_cfwrite 8
_expand_env 5735
_flush_log 251532
_fputs 306007
_fwrite 104
_initout 0
_lfwrite 96
_path_expand 5735
_putc_log 10468946
_puts_log 306007
absrtostr 34111
absrtostr_width_frac 142729
blancs 0
brute 0
bruti 1153911
bruti_intern 973903
bruti_sign 1379605
check_compress 36
check_gp_file 320
check_magic 12
check_secure 40
cxq_init 10941
dbg 0
dbgGEN 0
dbg_addr 0
dbg_pari_heap 0
dbg_word 0
decode_color 12
delete_buffer 10792
dft_help 20
do_append 0
dopr_arg_vector 1463
dosign 285608
env_ok 0
err_flush 0
err_printf 347
error0 14
ex10 176805
externstr 4
file_getline 992659
file_input 992583
file_is_binary 16
filestate_close 335364
filestate_restore 12809
filestate_save 140918
filtre0 1001443
fix_buffer 3409
fmtnum 144454
fmtreal 143114
fmtstr 157553
forpath_init 20
forpath_next 20
fputGEN_pariout 0
gen_output 59571
gen_output_fun 59571
get_file 0
get_free_gp_file 56
get_fun 202041
get_lines 8
get_sigd 143030
get_texvar 105
get_var 97080
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_history 0
gp_read_str_multiline 0
gp_read_stream 8439
gp_read_stream_buf 804141
gp_readvec_file 4
gp_readvec_stream 305
gpextern 4
gpinstall 20
gpsystem 28
gpwritebin 12
gsprintf 1603
gtolong_OK 77
gvsprintf 1958
history 59625
in_help 2316
init_filtre 806077
init_linewrap 61305
init_unique 0
initout 1872
input_loop 944769
install0 20
is_dir_stat 55
is_long_ok 24
is_magic_ok 79
is_sizeoflong_ok 12
isdenom 52402
isfactor 283133
isnull 3633329
isnull_for_pol 1745454
isone 1595942
itostr 6804
itostr_sign 751506
kill_file_stack 646092
killallfiles 49
log10_2 12
mat0n 392
matbrute 0
matbruti 59582
monome 216199
new_buffer 10792
new_gp_file 56
new_line 7920
newfile 40012
normalErrC 611097
normalErrF 39736
normalErrS 305896
normalOutC 9857849
normalOutF 211796
normalOutS 111
numdig 751506
ok_pipe 0
os_getenv 26297
out_print0 111297
out_print1 19859
out_printf 12154
out_putc 716131
out_puts 424692
out_term_color 66640
out_vprintf 13990
outmat 0
outpad 287414
output 0
paren 15456
pari_add_hist 103999
pari_ask_confirm 0
pari_close_files 1862
pari_close_homedir 1862
pari_dir_exists 0
pari_fclose 39935
pari_file_exists 0
pari_flush 198288
pari_fopen 0
pari_fopen_or_fail 0
pari_fopengz 39956
pari_fprintf 0
pari_fread_chars 112204
pari_fread_longs 72
pari_get_hist 59575
pari_get_histrtime 0
pari_get_histtime 0
pari_get_homedir 3736
pari_get_infile 39913
pari_histtime 25
pari_init_files 326159
pari_init_homedir 1872
pari_is_dir 55
pari_is_file 94
pari_is_rwx 0
pari_kill_file 40012
pari_last_was_newline 117514
pari_nb_hist 0
pari_open_file 0
pari_printf 743
pari_putc 103419
pari_puts 61051
pari_safefopen 0
pari_set_last_newline 145246
pari_sprint0 14
pari_sprintf 18796
pari_stdin_isatty 1872
pari_thread_close_files 325173
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 76169
path_expand 5735
path_is_absolute 20
popinfile 326938
print 110282
print0_file 94
print1 19831
print_0_or_pm1 1380121
print_coef 0
print_context 5410
print_entree 0
print_errcontext 13070
print_functions_hash 0
print_gcoef 237319
print_precontext 4613
print_prefixed_text 18473
printf0 742
printfl_0 110331
printfl_1 19831
printp 7
prints 0
printsep 966
printsep1 21
printtex 42
putc_lw 9780729
puts_lw 195259
quote_string 14930
rdGEN 16
rd_long 56
rdstr 8
readbin 12
readobj 28
readstr 4
real0tostr 1581
real0tostr_width_frac 661
resetout 1872
runaway_close 2179
set_last_newline 1138142
shift_add 143471
sm_dopr 77632
stack_GENtostr_fun 70735
stack_GENtostr_fun_unquoted 25748
stack_sprintf 41425
str_absint 570104
str_addr 0
str_alloc 610704
str_alloc0 2128
str_arg_vprintf 225727
str_init 295743
str_long 176951
str_print0 142466
str_printf 148096
str_putc 15214288
str_puts 2464200
str_putscut 157553
str_ulong 176951
strexpand 12
strftime_expand 4
string_gets 0
strip_last_nl 0
strlen_real 172484
strprintf 721
strtex 126
switchin 27
switchin_last 7
switchout 0
switchout_get_FILE 94
term_color 709
term_get_color 81076
term_height 7
term_height_intern 7
term_width 22518
term_width_intern 22518
texVpowE 210
texe 0
texexpo 210
texi 319
texi_sign 516
texnome 203
texparen 0
times_monome 176092
times_texnome 140
tmp_restore 13247
try_dlopen 0
try_name 20
try_open 20
try_pipe 8
uordinal 0
utodec 1132901
v_get_arg 1876
vsigne 0
warning0 7
wr 94
wrGEN 16
wr_check 122
wr_dec 160079
wr_lead_monome 97948
wr_lead_texnome 119
wr_long 80
wr_monome 172592
wr_texnome 105
wr_vecsmall 6689
wrexpo 231417
write0 82
write1 8
writeGEN 8
write_magic 12
writebin 12
writenamedGEN 8
writetex 4
wrstr 8
zeros 15173
zerotostr 126

Generated by: LCOV version 1.16