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 30574-595e4ba651) Lines: 535 567 94.4 %
Date: 2025-12-18 09:22:54 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 482300
sqrs 732594
divur 2509421
divir 3503670
truedvmdsi 6202031
divrs 9872347
dbltor 13390907
dblexpo 25894484
int2u 26159368
mantissa_real 53763184
mulrrz_int 53801144
invmod2BIL 60843925
trunc2nr 62703076
invr_basecase 62861221
invr 62862127
addmulii_gen 90747284
int2n 106084806
mulsr 117519128
truedvmdis 131104357
truedvmdii 134192179
addmulii 168695959
mulss 201179527
usqrt 231817502
rtodbl 288969892
addmulii_lg3 472801472
sqrz_i 556400038
sqrr 589215325
mulsi 610706159
sqru 627087644
mulrrz_3 652801882
mulur_2 705861204
mulrrz_3end 773552702
mulur 928529246
mulir 987482453
divru 1083846926
mului 1108917000
affrr 1343698824
addmulii_inplace 1581445287
sqri 1912831591
vals 2268476664
shifti 2270210588
modii 3085092935
mulrrz_end 3557310090
mulrrz_i 3711020035
mulrr 3957089405
muluu 4569194133
mulii 20992168764

Generated by: LCOV version 1.16