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 - lll.c (source / functions) Hit Total Coverage
Test: PARI/GP v2.18.1 lcov report (development 30007-407ab607e8) Lines: 1335 1641 81.4 %
Date: 2025-02-20 09:19:49 Functions: 125 130 96.2 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
Babai 0
RgM_flop 0
dbg_flatter 0
dbg_flattergram 0
fplll 0
matkerint0 28
lllgramkerim 35
lllkerim 35
kerint 42
lllgen 42
lllgramgen 42
lllgramkerimgen 42
lllkerimgen 42
qflllgram 63
kerint0 70
incrementalGSgen 168
lllallgen 168
lllgramallgen 168
lllint 183
REDgen 196
do_SWAPgen 196
qflllgram0 245
qflll0 301
pslg 504
ZM_flattergram 961
ZM_flattergram_rank 961
gramschmidt_upper 1336
RgM_Cholesky_dynprec 2967
flattergram_i 2967
ZM_to_RM 4133
fplll_heuristic 4133
gc_lll 4722
lllgram 9089
truncexpo 12132
ZC_to_RC 15707
dpeM_diagonal_shallow 20292
RgM_flip 34904
lllgramint 36439
lllall 36699
get_gaussred 44316
RgM_is_square_mat 45828
dpetor 94015
setG2_heuristic 183605
realsqrdotproduct 193281
setG_heuristic 201454
dpe_negz 244079
submulzu2n 262549
addmulzu2n 271563
Babai_heuristic 283467
mulshift 317482
dpe_addmuluz 342689
absrsmall2 394782
dpe_submuluz 411952
rotateG 440490
ZM_is_knapsack 606503
ZM_flatter_rank 616560
fplll_flatter 617521
ZM_flatter 618574
dperotate 651484
addmuliu642n 668825
u64toineg 668825
submuliu642n 685833
absrsmall 687537
lll_trivial 770187
dpe_muluz 799192
get_gramschmidt 1082990
realdotproduct 1167169
lll 1175039
ZM_is_lower 1182694
drop 1336324
potential 1336324
flat 1336325
sizered 1336325
affii_or_copy_gc 1388053
dpe_abssmall 1388065
submulshift 1502834
fplll_dpe 1568492
dpe_addz 1942243
vectail_inplace 2055965
fplll_fast 2069642
lll_finish 2130148
dbldotsquare 2440949
gramschmidt_dynprec 2672650
affdbldpe 3136978
cget_dpemat 3136985
mpabscmp 4066599
addmuliu2n 4092428
submuliu2n 4178013
ZM_is_upper 4180037
addmulziu 4577411
Babai_dpe 4587457
GS_extraprec 4691382
condition_bound 4691382
ZM2_lll_norms 4702832
gsisinv 5151556
dpe_cmpmul 5195418
dpe_cmp 5195431
lllfp 5270792
spread 5808734
submulziu 5920128
ZM_lll_norms 6957188
nbits2prec64 7418326
cget_dblmat 8278555
addmuliu64_inplace 9502895
submuliu64_inplace 9557744
pari_rint 10720635
rotateG_fast 11486336
update_alpha 11926989
cget_dpevec 13045417
dpe_divz 13959625
dpe_abscmp 14400341
setG2_fast 16925707
addzi 17775953
subzi 18517751
u64toi 19746472
affidpe 20527092
setG_fast 22483525
set_line 24720020
affdpe 25569939
Babai_fast 30048679
rotate 31769384
dblrotate 34459048
cget_dblvec 34498883
dpe_normalize 47909443
dpe_submulz 51529438
dpe_subz 53559658
dpe_mulz 56724710
dpe_normalize0 108046799
dbldotproduct 117781173
itodbl_exp 161895271

Generated by: LCOV version 1.16