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 30571-c0dfe82732) Lines: 535 567 94.4 %
Date: 2025-12-09 09:22:05 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 187467
mul0r 482298
sqrs 731992
divur 2509416
divir 3503674
truedvmdsi 6202031
divrs 9872257
dbltor 13390214
dblexpo 25893122
int2u 26159121
mantissa_real 53763915
mulrrz_int 53801120
invmod2BIL 60843928
trunc2nr 62695874
invr_basecase 62866821
invr 62867876
addmulii_gen 90751641
int2n 106080161
mulsr 117515045
truedvmdis 131115212
truedvmdii 134201600
addmulii 168691545
mulss 201178368
usqrt 231548744
rtodbl 288966688
addmulii_lg3 472787812
sqrz_i 556309787
sqrr 589173869
mulsi 610714233
sqru 627044282
mulrrz_3 652651325
mulur_2 705664254
mulrrz_3end 773338485
mulur 928317079
mulir 987067581
divru 1083759056
mului 1109163341
affrr 1343466529
addmulii_inplace 1581426726
sqri 1911621033
vals 2267689142
shifti 2269664917
modii 3083630736
mulrrz_end 3557217880
mulrrz_i 3710364890
mulrr 3956792845
muluu 4567427575
mulii 20985898858

Generated by: LCOV version 1.16