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 30532-0c728fd268) Lines: 535 567 94.4 %
Date: 2025-10-21 09:22:31 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 187460
mul0r 482302
sqrs 732419
divur 2509220
divir 3503537
truedvmdsi 6202031
divrs 9869869
dbltor 13388484
int2u 26154781
dblexpo 26475633
mantissa_real 53609300
mulrrz_int 55697010
invmod2BIL 60744895
trunc2nr 62696254
invr_basecase 63130757
invr 63131794
addmulii_gen 90738078
int2n 105934866
mulsr 118072174
truedvmdis 130874248
truedvmdii 133956567
addmulii 168632275
mulss 201178688
usqrt 232064182
rtodbl 289663020
addmulii_lg3 472714178
sqrz_i 561441484
sqrr 594265543
mulsi 609255176
sqru 627360318
mulrrz_3 654416946
mulur_2 706376786
mulrrz_3end 775148732
mulur 928352423
mulir 987059876
mului 1109007421
divru 1113048601
affrr 1379697585
addmulii_inplace 1581315467
sqri 1912475430
vals 2267330158
shifti 2270067403
modii 3083774113
mulrrz_end 3601010086
mulrrz_i 3751388793
mulrr 3997245119
muluu 4562214103
mulii 20972935790

Generated by: LCOV version 1.16