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
addmulii 168687661
addmulii_gen 90755045
addmulii_inplace 1581451953
addmulii_lg3 472803482
affrr 1343755205
dblexpo 25893244
dblmantissa 0
dbltor 13389540
div0r 187356
divir 3503442
divrs 9871955
divru 1084040878
divsi 175
divsr 798
divur 2509247
int2n 106086185
int2u 26210998
int2um1 8831
invmod2BIL 60841071
invr 62869111
invr_basecase 62868650
mantissa_real 53767242
modii 3085439865
mul0r 482292
mulii 20989347173
mulir 986809881
mulrr 3957352679
mulrrz_3 652765712
mulrrz_3end 773424105
mulrrz_end 3557724929
mulrrz_i 3710537345
mulrrz_int 53801146
mulsi 610713861
mulsr 117504498
mulss 201177980
mului 1110218508
mulur 928040817
mulur_2 705422807
muluu 4569238962
rtodbl 288845815
shifti 2270753433
sqri 1912605414
sqrr 589255834
sqrs 731769
sqru 627124819
sqrz_i 556405179
truedvmdii 134201601
truedvmdis 131118303
truedvmdsi 6202031
trunc2nr 62695652
usqrt 231829630
vals 2282057154

Generated by: LCOV version 1.16