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 - default.c (source / functions) Hit Total Coverage
Test: PARI/GP v2.16.2 lcov report (development 29420-55f63b8cfe) Lines: 373 591 63.1 %
Date: 2024-07-03 09:03:24 Functions: 44 70 62.9 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
TeX_define 0
TeX_define2 0
call_f2 930
compare_name 0
default0 912
default_gp_data 1851
defaults_list 0
delete_dirs 7364
delete_path 3682
err_intarray 21
expand_path 3682
get_int 44
get_sep 1608
get_uint 1167
getrealprecision 0
gp_get_color 28
init_fmt 1851
init_graphs 1851
init_help 1851
init_hist 1865
init_path 3702
init_pp 1851
my_int 1211
open_logfile 0
pari_close_paths 1841
pari_default_path 1851
pari_init_paths 1841
parse_intarray 39
sd_PATH 0
sd_TeXstyle 0
sd_colors 4
sd_compatible 0
sd_datadir 40
sd_debug 28
sd_debugfiles 21
sd_debugmem 0
sd_factor_add_primes 0
sd_factor_proven 0
sd_factorlimit 0
sd_format 7
sd_histsize 14
sd_intarray 39
sd_log 0
sd_logfile 0
sd_nbthreads 7
sd_new_galois_format 28
sd_output 0
sd_parisize 384
sd_parisizemax 0
sd_path 0
sd_prettyprinter 0
sd_primelimit 14
sd_realbitprecision 21
sd_realprecision 451
sd_res 665
sd_secure 0
sd_seriesprecision 35
sd_simplify 0
sd_size 384
sd_sopath 0
sd_strictargs 7
sd_strictmatch 0
sd_string 4
sd_threadsize 0
sd_threadsizemax 0
sd_toggle 44
sd_ulong 311
sd_ulong_init 1167
setdefault 930
setrealprecision 0

Generated by: LCOV version 1.16