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 30401-87099e65a6) Lines: 535 567 94.4 %
Date: 2025-07-18 09:23:12 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 187454
mul0r 482305
sqrs 1540404
divur 2500522
divir 3501391
truedvmdsi 6202031
divrs 9961785
dbltor 13374259
int2u 25979501
dblexpo 26510171
mantissa_real 53496996
mulrrz_int 55660619
invmod2BIL 60682446
trunc2nr 62685582
invr_basecase 63105990
invr 63106434
addmulii_gen 90726356
int2n 105877285
mulsr 118202429
truedvmdis 130834357
truedvmdii 133914879
addmulii 168635310
mulss 201175634
usqrt 231818123
rtodbl 290096267
addmulii_lg3 472262227
sqrz_i 561152246
sqrr 594142348
mulsi 604825136
sqru 623806005
mulrrz_3 654729149
mulur_2 705863317
mulrrz_3end 775111324
mulur 927331041
mului 947972706
mulir 986087587
divru 1113399161
affrr 1379365413
addmulii_inplace 1575320255
sqri 1906381249
vals 2252502279
shifti 2258283982
modii 3081471106
mulrrz_end 3598276206
mulrrz_i 3746598864
mulrr 3995395974
muluu 4565205797
mulii 21119367663

Generated by: LCOV version 1.16