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 - basemath - grossenchar.c (source / functions) Hit Total Coverage
Test: PARI/GP v2.18.1 lcov report (development 30499-74bdd0ac5b) Lines: 1033 1048 98.6 %
Date: 2025-09-18 09:23:44 Functions: 66 66 100.0 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
eulerf_gchar 14
gchar_algebraic_basis 70
gcharlog 70
col_2ei 112
gchar_algebraicnormtype 154
gcharisalgebraic 189
gchar_algebraicoftype 210
gchar_conductor 224
gchari_conductor 224
cm_select 231
gcharalgebraic 280
lfungchar 406
gcharlocal 497
bestS 630
compute_Lcyc 630
gcharDLdata 630
gchar_hnfreduce_shallow 630
gchar_snfbasis_shallow 630
localstar 630
gcharinit 651
vecan_gchar 707
lll_block 733
hnf_block 1239
rowreverse 1239
cleanup_vga 1351
conductor_expo_pr 1358
gchari_lfun 1400
gcharmat_tinverse 1575
gcharlog_conductor_f 1617
gcharmatnewprec_shallow 1743
gcharduallog 1799
gcharnewprec 1834
gcharnewprec_i 1834
gchar_Sval 1911
gchar_nflog 1911
sprk_get_ncp 2051
check_gchari 2121
safelgcols 2121
shallowmatinsert 2326
vec_v0 2326
mextraprec 2509
gchar_identify_i 3941
gchareval 3969
gchar_identify 4011
gchar_identify_init 4011
same_arg 4542
vaffect_shallow 4542
shallow_clean_rat 5041
embedcol 6706
check_gchar 7084
gchar_internal 7084
gchari_duallog 8750
is_gchar_group 8911
check_gchar_i 9184
check_gchar_group 11445
check_localstar 13265
_check_gchar_group 13279
gcharlog_conductor_oo 16891
RgV_frac_inplace 24024
gchari_eval 186886
gchar_log 190673
gcharisprincipal 190673
gchar_logm 192584
nfembedlog 197126
gcharlog_eval_raw 201544
gaddmul 2492623

Generated by: LCOV version 1.16