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 30417-3115e90663) Lines: 535 567 94.4 %
Date: 2025-07-28 09:23:22 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 187444
mul0r 482291
sqrs 1541182
divur 2500508
divir 3501380
truedvmdsi 6202031
divrs 9961795
dbltor 13374342
int2u 25980078
dblexpo 26509935
mantissa_real 53496971
mulrrz_int 55660619
invmod2BIL 60685085
trunc2nr 62685162
invr_basecase 63108326
invr 63108813
addmulii_gen 90723716
int2n 105875079
mulsr 118187196
truedvmdis 130844571
truedvmdii 133925323
addmulii 168625075
mulss 201176018
usqrt 231723027
rtodbl 290059743
addmulii_lg3 472257613
sqrz_i 561134073
sqrr 594132266
mulsi 604822947
sqru 623743778
mulrrz_3 654799453
mulur_2 705734064
mulrrz_3end 775185323
mulur 927348179
mului 946435987
mulir 986162242
divru 1113247578
affrr 1379261756
addmulii_inplace 1575297595
sqri 1906360005
vals 2252142489
shifti 2258263225
modii 3080290034
mulrrz_end 3598079983
mulrrz_i 3746717279
mulrr 3995706910
muluu 4565464301
mulii 21112911057

Generated by: LCOV version 1.16