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 30550-07450a7a86) Lines: 535 567 94.4 %
Date: 2025-11-18 09:22:37 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 187458
mul0r 482314
sqrs 731790
divur 2509318
divir 3503624
truedvmdsi 6202031
divrs 9871136
dbltor 13388981
dblexpo 25890283
int2u 26156211
mantissa_real 53608934
mulrrz_int 53800761
invmod2BIL 60743967
trunc2nr 62694725
invr_basecase 62838681
invr 62839463
addmulii_gen 90727605
int2n 105934475
mulsr 117492158
truedvmdis 130881909
truedvmdii 133961727
addmulii 168629643
mulss 201178598
usqrt 231791657
rtodbl 288888870
addmulii_lg3 472677108
sqrz_i 555585434
sqrr 588459004
mulsi 609229508
sqru 626993205
mulrrz_3 652591274
mulur_2 704493152
mulrrz_3end 773191731
mulur 927035966
mulir 985764252
divru 1083521166
mului 1105778732
affrr 1343067146
addmulii_inplace 1581228172
sqri 1911799020
vals 2267154697
shifti 2269097905
modii 3082567443
mulrrz_end 3555418831
mulrrz_i 3708954420
mulrr 3955702303
muluu 4561405231
mulii 20969515698

Generated by: LCOV version 1.16