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 30371-bd27ad7662) Lines: 535 567 94.4 %
Date: 2025-07-07 09:23: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 187459
mul0r 482274
sqrs 1541388
divur 2500514
divir 3501400
truedvmdsi 6202031
divrs 9961761
dbltor 13374080
int2u 25997237
dblexpo 26510327
mantissa_real 53493657
mulrrz_int 55660643
invmod2BIL 60666738
trunc2nr 62684291
invr_basecase 63083967
invr 63084361
addmulii_gen 90694209
int2n 106855466
mulsr 118189170
truedvmdis 130812862
truedvmdii 133893483
addmulii 168634078
mulss 201176338
usqrt 230757652
rtodbl 290073522
addmulii_lg3 472256356
sqrz_i 561181272
sqrr 594196060
mulsi 604771059
sqru 617922927
mulrrz_3 654740505
mulur_2 705759702
mulrrz_3end 775110336
mulur 927206305
mului 945624728
mulir 986025076
divru 1113431578
affrr 1379369450
addmulii_inplace 1575278216
sqri 1900583136
vals 2253649659
shifti 2257429079
modii 3083316854
mulrrz_end 3598588192
mulrrz_i 3746389495
mulrr 3997214234
muluu 4576643168
mulii 21115503956

Generated by: LCOV version 1.16