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 - base5.c (source / functions) Hit Total Coverage
Test: PARI/GP v2.18.1 lcov report (development 30256-57c6c2b57f) Lines: 1098 1597 68.8 %
Date: 2025-05-09 09:19:30 Functions: 76 89 85.4 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
K6_invar 0
K6_pol 0
RED 364
RgV_find_denom 14
check_0 84
colcomb 64318
colcomb1 81119
condliftA4 0
condliftA5 0
condliftS4 0
condliftpA4 0
condliftpA5 0
condliftpS4 0
decind 0
decmat 0
do_SWAP 98
element_close 24078
element_mulvecrow 315
eltabstorel 31549
eltabstorel_lift 36764
eltdown 0
eltreltoabs 111397
fail 49
findmin 364
idV_simplify 5484
initmat 28
mattocomplex 14
mknfabs 2401
mkupdown 2345
modulereltoabs 3080
nf_all_roots 14
nf_nfzk 2870
nf_rnfeq 2877
nf_rnfeqsimple 378
nfbezout 43273
nfcleanmod 24476
nfdetint 742
nfeltup 497
nfhnf 2846
nfhnf0 2860
nfhnfmod 2673
nfreduce 7
nfsnf 0
nfsnf0 49
nftau 196
nftocomplex 1022
prodidnorm 105
rel_T2 14
rnfV_to_nfM 483
rnf_build_nfabs 141776
rnf_zkabs 2618
rnfcomplete 35872
rnfdisc_get_T 4592
rnfdisc_get_T_i 4592
rnfeltabstorel 72597
rnfeltdown 3164
rnfeltdown0 3633
rnfeltreltoabs 196836
rnfeltup 24404
rnfeltup0 39624
rnfequation 34111
rnfequation0 48034
rnfequation2 10507
rnfequationall 48412
rnfideal0 154
rnfidealabstorel 455
rnfidealdown 217
rnfidealfactor 35
rnfidealhnf 1330
rnfidealmul 56
rnfidealnormabs 203
rnfidealnormrel 196
rnfidealprimedec 19728
rnfidealprimedec_1 19728
rnfidealreltoabs 0
rnfidealreltoabs0 238
rnfidealreltoabs_i 497
rnfidealtwoelement 259
rnfidealup 224
rnfidealup0 245
rnfinit 1295
rnfinit0 2814
rnflllgram 14
rnfpolred 7
rnfprincipaltohnf 770
rnfpseudobasis 126
rnfscal 357
rowcomb 196
zero_nfbezout 38919

Generated by: LCOV version 1.16