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 - kernel/none - mp_indep.c (source / functions) Hit Total Coverage
Test: PARI/GP v2.18.1 lcov report (development 30365-beea1ff998) Lines: 535 567 94.4 %
Date: 2025-07-02 09:21:24 Functions: 51 52 98.1 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
dblmantissa 0
divsi 175
divsr 798
int2um1 8831
div0r 187460
mul0r 482317
sqrs 1541327
divur 2500522
divir 3501402
truedvmdsi 6202031
divrs 9961755
dbltor 13374272
int2u 25997750
dblexpo 26510737
mantissa_real 53499382
mulrrz_int 55660619
invmod2BIL 60666789
trunc2nr 62676057
invr_basecase 63114197
invr 63115237
addmulii_gen 90736802
int2n 106854914
mulsr 118190903
truedvmdis 130832070
truedvmdii 133915964
addmulii 168629835
mulss 201176596
usqrt 230263704
rtodbl 290074265
addmulii_lg3 472277023
sqrz_i 561261915
sqrr 594142899
mulsi 604809060
sqru 617901218
mulrrz_3 655019626
mulur_2 705527710
mulrrz_3end 775598142
mulur 927029404
mului 945301080
mulir 985711702
divru 1113121224
affrr 1379348390
addmulii_inplace 1575480729
sqri 1901855069
vals 2254310602
shifti 2257664437
modii 3084735883
mulrrz_end 3598844369
mulrrz_i 3749337113
mulrr 3995211791
muluu 4579269110
mulii 21119327095

Generated by: LCOV version 1.16