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 - bibli1.c (source / functions) Hit Total Coverage
Test: PARI/GP v2.18.1 lcov report (development 30365-beea1ff998) Lines: 1175 1243 94.5 %
Date: 2025-07-01 09:21:48 Functions: 75 81 92.6 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
ApplyAllQ 16958613
ApplyQ 46046070
FindApplyQ 24701673
QR_init 7742749
R_from_QR 14280
RgC_ApplyAllQ 567
RgC_ApplyQ 22113
RgM_Babai 56723
RgM_QR_init 21
RgM_gram_schmidt 56723
ZC_canon 5502
ZM_zc_mul_canon 5502
ZM_zc_mul_canon_zm 240366
addcolumntomatrix 1652
addmulimp 13538822
algdep 0
algdep0 77
bestapprnf 2163
bestapprnf_i 15624
check 882
check_bound 4167488
check_householder 35
cholesky_norm_ek 182
choose_params 21
clonefill 141
cvp0 91
cvp0_dolll 91
cvp_alloc 70
cx_bestapprnf 11991
do_exhaustive 7
err_minim 0
fincke_pohst 14734
forqfvec 0
forqfvec0 42
forqfvec1 42
forqfvec_i 42
forqfvec_init 42
forqfvec_init_dolll 902
forqfvec_wrap 56
gaussred_from_QR 299166
lindep 0
lindep0 434
lindep2 112
lindep_Xadic 77
lindep_bit 3311
lindep_padic 28
lindepcx 11991
lindepfull_bit 15302
lllintpartial 35
lllintpartial_inplace 0
lllintpartialall 35
mathouseholder 35
matqr 35
minim 7
minim0 553
minim0_dolll 847
minim0_zm 252
minim2 0
minim_alloc 123292
minim_lll 902
minim_raw 42
minim_zm 252
mpgreaterthan 4621588
mplessthan 1216483
mulimp 1228574
no_prec_pb 24692806
norm_aux 5780555
qfcvp0 91
qfminim0 133
qfperfection 42
qfrep0 462
real_indep 8123
seralgdep 42
serdiffdep 14
sertomat 56
smallvectors 14713
sol_OK 14021
step 2952936
stockmax_init 923
vec_lindep 35
zncoppersmith 35

Generated by: LCOV version 1.16