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

Generated by: LCOV version 1.16