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 - alglin2.c (source / functions) Hit Total Coverage
Test: PARI/GP v2.18.1 lcov report (development 30702-bddb8d6928) Lines: 1078 1189 90.7 %
Date: 2026-02-23 02:23:56 Functions: 89 96 92.7 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
Flm_trace 0
Frobeniusform 0
QM_ImZ_hnf 0
QM_ImZ_hnfall 0
RgM_replace 0
RgXQ_minpoly_FpXQ 0
gc_mat2 0
qfgaussred2 5
RgM1_char 6
adjsafe 6
qfcholesky 10
caract 12
qfgaussred 16
qfgaussred0 16
RgM_adj_from_char 18
RgXQ_minpoly_FpXQXQ 18
cxquadnorm 23
QM_ImZ 24
QM_ImZ_all 24
jacobi 24
matcompanion 29
RgM_Fp_charpoly 30
QM_minors_coprime 36
caract_const 36
RgM_minpoly 42
minpoly_listpolslice 42
QM_ImQ 48
bad_char 48
RgXQ_minpoly_naive 54
pnormlpvec 54
adj 90
matadjoint0 96
caradj 102
matrixqz0 114
RgM_hess_charpoly 144
carhess 144
gnorml1 144
RgM_hess 150
hess 150
pnormlp 168
minpoly_dvdslice 174
QM_charpoly_ZX_bound 228
relative0 312
gnormlp 318
matfrobenius 432
minpoly_polslice 432
RgM_Frobenius 474
charpoly0 474
transS 540
FpM_hess 688
weakfrobenius_step1 708
weakfrobenius_step2 708
weakfrobenius_step3 708
QM_ImQ_hnf 1014
carberkowitz 1500
QM_charpoly_ZX 1584
mattrace 1686
fix_pol 1704
Flm_charpoly 1903
ZM_charpoly 2067
transD 2436
RgXQ_minpoly 2701
RgXQ_minpoly_fast 2701
QM_ImQ_hnfall 2922
QM_ImQ_all 2970
QM_ImZ_all_i 2988
easymin 3000
minpoly 3000
charpoly 3327
charpoly_bound 3375
QM_charpoly_ZX_slice 3737
QM_charpoly_ZX_worker 3737
QM_charpoly_ZX_i 3879
intersect 4344
easychar 5151
qfsign 9831
gaussred 9847
transL 13062
rot 16440
FpM_charpoly 25364
Flm_charpoly_i 29681
Flm_hess 29681
Flm_hess_pre 29681
suitable 37290
RgM_Cholesky 55778
qfgaussred_positive 56819
gnorml1_fake 166830
FpM_trace 188342
ZM_trace 248166
gtrace 637395
gsupnorm 1020481
gnorm 3014955
store 24286028
gsupnorm_aux 29211394
gnorml2 30444893
gnorml2_i 30444917

Generated by: LCOV version 1.16