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 30587-f85873d515) Lines: 535 567 94.4 %
Date: 2025-12-27 09:21:13 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 186656
mul0r 482285
sqrs 731296
divur 2508490
divir 3502246
truedvmdsi 6202031
divrs 9871335
dbltor 13384153
dblexpo 25890387
int2u 26081930
mantissa_real 53751144
mulrrz_int 53801066
invmod2BIL 60827500
trunc2nr 62679053
invr_basecase 62848477
invr 62848778
addmulii_gen 90729399
int2n 106043412
mulsr 117471369
truedvmdis 131088990
truedvmdii 134172035
addmulii 168685121
mulss 201177365
usqrt 231953670
rtodbl 288701411
addmulii_lg3 472769334
sqrz_i 556346797
sqrr 589132823
mulsi 610671346
sqru 626932583
mulrrz_3 652781987
mulur_2 705527204
mulrrz_3end 773454806
mulur 928076139
mulir 986985406
divru 1083764805
mului 1109171077
affrr 1343544708
addmulii_inplace 1581336800
sqri 1901727422
shifti 2260599306
vals 2275628350
modii 3081647651
mulrrz_end 3557183317
mulrrz_i 3710298373
mulrr 3956519985
muluu 4564193117
mulii 20972862130

Generated by: LCOV version 1.16