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 - modules - ratpoints.c (source / functions) Coverage Total Hit
Test: PARI/GP v2.19.0 lcov report (development 31092-e6893b0017) Lines: 96.7 % 911 881
Test Date: 2026-08-10 17:02:30 Functions: 100.0 % 33 33
Legend: Lines:     hit not hit

Function Name Sort by function name Hit count Sort by function hit count
QX_hyperellratpoints 12446
ZX_homogenous_evalpow 168
ZX_hyperellratpoints 12446
ZX_positive_region 12439
_ratpoints_check_point 3285071
_ratpoints_sift0 46613825
alloc_sieve 12439
args_h 12446
compare_entries 1172571
ellratpoints 896
find_points_init 12439
find_points_work 12439
gen_inverses 12439
gen_offsets 12439
gen_sieve 12439
gen_sieves0 12439
gen_squares 12439
get_2adic_info 12439
hyperell_check 11550
hyperellratpoints 11550
mod 889704378
posint 12439
process 89285
ratpoints_compute_sturm 12439
rpjacobi 51468685
set_bc 2328929
setup_us1 1351
sieve_init1 2738138
sieve_init2 9943587
sieving_info 12439
sift 31947563
to_RgX 70
vec_append_grow 86254

Generated by: LCOV version 2.0-1