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

Generated by: LCOV version 1.16