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 30572-91e0396466) Lines: 535 567 94.4 %
Date: 2025-12-13 09:22:30 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 482259
sqrs 731979
divur 2509430
divir 3503676
truedvmdsi 6202031
divrs 9872254
dbltor 13390609
dblexpo 25894025
int2u 26158985
mantissa_real 53765535
mulrrz_int 53801120
invmod2BIL 60843957
trunc2nr 62695553
invr_basecase 62868423
invr 62869081
addmulii_gen 90756380
int2n 106082356
mulsr 117513290
truedvmdis 131093820
truedvmdii 134181193
addmulii 168692393
mulss 201178540
usqrt 231686776
rtodbl 288985806
addmulii_lg3 472808906
sqrz_i 556320489
sqrr 589171187
mulsi 610693006
sqru 627021599
mulrrz_3 652578572
mulur_2 705527386
mulrrz_3end 773253248
mulur 928181218
mulir 986885183
divru 1083810959
mului 1109150240
affrr 1343494678
addmulii_inplace 1581468937
sqri 1911710162
vals 2268206626
shifti 2269613195
modii 3083394411
mulrrz_end 3557274343
mulrrz_i 3710322310
mulrr 3956642078
muluu 4567795903
mulii 20986811407

Generated by: LCOV version 1.16