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 30389-5834e21cc1) Lines: 535 567 94.4 %
Date: 2025-07-12 09:22:57 Functions: 51 52 98.1 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
addmulii 168632676
addmulii_gen 90734362
addmulii_inplace 1575432574
addmulii_lg3 472281917
affrr 1379399530
dblexpo 26511994
dblmantissa 0
dbltor 13374396
div0r 187461
divir 3501405
divrs 9961790
divru 1113271973
divsi 175
divsr 798
divur 2500511
int2n 105877731
int2u 25979910
int2um1 8831
invmod2BIL 60682318
invr 63113528
invr_basecase 63113144
mantissa_real 53499820
modii 3083222311
mul0r 482287
mulii 21118272209
mulir 985804524
mulrr 3995326077
mulrrz_3 655179661
mulrrz_3end 775765849
mulrrz_end 3598869809
mulrrz_i 3749480137
mulrrz_int 55660619
mulsi 604817557
mulsr 118182831
mulss 201175999
mului 947950685
mulur 927075514
mulur_2 705520019
muluu 4566737701
rtodbl 290085346
shifti 2258896580
sqri 1907978487
sqrr 594182369
sqrs 1540449
sqru 623848593
sqrz_i 561355069
truedvmdii 133917384
truedvmdis 130837594
truedvmdsi 6202031
trunc2nr 62683873
usqrt 231497519
vals 2252397269

Generated by: LCOV version 1.16