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 30532-0c728fd268) Lines: 535 567 94.4 %
Date: 2025-10-22 09:22:36 Functions: 51 52 98.1 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
addmulii 168647349
addmulii_gen 90729693
addmulii_inplace 1581287052
addmulii_lg3 472705154
affrr 1379716306
dblexpo 26476756
dblmantissa 0
dbltor 13388236
div0r 187461
divir 3503537
divrs 9869790
divru 1113076991
divsi 175
divsr 798
divur 2509224
int2n 105934145
int2u 26154584
int2um1 8831
invmod2BIL 60744895
invr 63128227
invr_basecase 63127247
mantissa_real 53608850
modii 3083181673
mul0r 482299
mulii 20973767105
mulir 986897712
mulrr 3997238472
mulrrz_3 654324825
mulrrz_3end 775028808
mulrrz_end 3600847042
mulrrz_i 3751238835
mulrrz_int 55697010
mulsi 609250222
mulsr 118071783
mulss 201178879
mului 1107762080
mulur 928250889
mulur_2 706265047
muluu 4562892889
rtodbl 289602388
shifti 2270167913
sqri 1912367094
sqrr 594279660
sqrs 732386
sqru 627334504
sqrz_i 561442380
truedvmdii 133945768
truedvmdis 130863908
truedvmdsi 6202031
trunc2nr 62693666
usqrt 231682730
vals 2267526637

Generated by: LCOV version 1.16