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.1 lcov report (development 30111-a34de28cf8) Lines: 2056 2792 73.6 %
Date: 2025-04-02 09:20:49 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
times_texnome 140
zerotostr 154
texnome 203
texVpowE 210
texexpo 210
gp_readvec_stream 305
texi 319
check_gp_file 320
err_printf 347
mat0n 392
texi_sign 516
real0tostr_width_frac 661
term_color 709
strprintf 721
GENtoGENstr 728
GENtostr_fun 732
printf0 742
pari_printf 757
pari_vprintf 757
printsep 966
dopr_arg_vector 1463
gsprintf 1603
real0tostr 1651
v_get_arg 1876
pari_close_files 1883
pari_close_homedir 1883
initout 1893
pari_init_homedir 1893
pari_stdin_isatty 1893
resetout 1893
gvsprintf 1993
str_alloc0 2108
runaway_close 2200
in_help 2372
fix_buffer 3409
GENtostr_raw 3696
pari_get_homedir 3778
print_precontext 4613
print_context 5410
_expand_env 5798
_path_expand 5798
path_expand 5798
itostr 6804
new_line 7920
wr_vecsmall 8068
gp_read_stream 8439
delete_buffer 10813
new_buffer 10813
gp_filter 11039
Str 11064
cxq_init 11123
Str_fun 11190
RgV_to_str 11202
out_printf 12357
filestate_restore 13012
print_errcontext 13273
tmp_restore 13457
out_vprintf 14214
quote_string 14958
zeros 15299
paren 15547
print_prefixed_text 18676
pari_sprintf 19006
print1 20223
printfl_1 20223
out_print1 20251
term_width 22728
term_width_intern 22728
GENtostr_unquoted 26021
stack_GENtostr_fun_unquoted 26021
os_getenv 26549
absrtostr 34566
pari_get_infile 39913
pari_fclose 39935
pari_fopengz 39956
newfile 40012
pari_kill_file 40012
normalErrF 40359
stack_sprintf 42160
isdenom 52521
gen_output 60383
gen_output_fun 60383
pari_get_hist 60387
matbruti 60394
history 60437
pari_puts 61863
init_linewrap 62138
out_term_color 67466
stack_GENtostr_fun 71603
pari_vsprintf 77373
sm_dopr 78836
term_get_color 82105
get_var 97682
wr_lead_monome 98564
pari_putc 104245
pari_add_hist 106344
print 111444
printfl_0 111493
pari_fread_chars 112204
out_print0 112459
pari_last_was_newline 120069
absrtostr_width_frac 142736
get_sigd 143037
fmtreal 143121
shift_add 143478
filestate_save 143823
str_print0 144020
fmtnum 145588
pari_set_last_newline 148158
str_printf 148257
fmtstr 158191
str_putscut 158191
wr_dec 160345
strlen_real 173170
wr_monome 173866
times_monome 177100
ex10 177267
str_long 181739
str_ulong 181739
puts_lw 197639
pari_flush 200689
get_fun 204407
normalOutF 214407
monome 217900
str_arg_vprintf 227091
VpowE 232838
wrexpo 232838
print_gcoef 237606
_flush_log 254766
isfactor 284701
dosign 286686
outpad 288555
str_init 299376
normalErrS 308451
_fputs 308562
_puts_log 308562
pari_thread_close_files 336082
pari_init_files 337219
popinfile 337932
filestate_close 346300
out_puts 428598
str_absint 571891
str_alloc 612946
normalErrC 618853
kill_file_stack 667684
out_putc 724713
itostr_sign 753685
numdig 753685
gp_read_stream_buf 804141
init_filtre 806098
input_loop 947667
bruti_intern 979974
file_input 996069
file_getline 996145
filtre0 1004908
utodec 1137635
set_last_newline 1150630
bruti 1163592
bruti_sign 1390651
print_0_or_pm1 1391167
isone 1607477
isnull_for_pol 1747372
str_puts 2485308
isnull 3649233
putc_lw 9872585
normalOutC 9950510
_putc_log 10569363
str_putc 15339660

Generated by: LCOV version 1.16