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 30582-6e9af8ee1d) Lines: 535 567 94.4 %
Date: 2025-12-20 09:23:49 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 187356
mul0r 482292
sqrs 731769
divur 2509247
divir 3503442
truedvmdsi 6202031
divrs 9871955
dbltor 13389540
dblexpo 25893244
int2u 26210998
mantissa_real 53767242
mulrrz_int 53801146
invmod2BIL 60841071
trunc2nr 62695652
invr_basecase 62868650
invr 62869111
addmulii_gen 90755045
int2n 106086185
mulsr 117504498
truedvmdis 131118303
truedvmdii 134201601
addmulii 168687661
mulss 201177980
usqrt 231829630
rtodbl 288845815
addmulii_lg3 472803482
sqrz_i 556405179
sqrr 589255834
mulsi 610713861
sqru 627124819
mulrrz_3 652765712
mulur_2 705422807
mulrrz_3end 773424105
mulur 928040817
mulir 986809881
divru 1084040878
mului 1110218508
affrr 1343755205
addmulii_inplace 1581451953
sqri 1912605414
shifti 2270753433
vals 2282057154
modii 3085439865
mulrrz_end 3557724929
mulrrz_i 3710537345
mulrr 3957352679
muluu 4569238962
mulii 20989347173

Generated by: LCOV version 1.16