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 30586-ccf601f509) Lines: 535 567 94.4 %
Date: 2025-12-24 09:20:59 Functions: 51 52 98.1 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
addmulii 168693524
addmulii_gen 90744154
addmulii_inplace 1581389444
addmulii_lg3 472781305
affrr 1343773364
dblexpo 25892097
dblmantissa 0
dbltor 13383822
div0r 186650
divir 3502226
divrs 9871303
divru 1083962272
divsi 175
divsr 798
divur 2508484
int2n 106043382
int2u 26082238
int2um1 8831
invmod2BIL 60827507
invr 62862744
invr_basecase 62862260
mantissa_real 53755028
modii 3079497932
mul0r 482320
mulii 20973007713
mulir 986865904
mulrr 3957308515
mulrrz_3 652674456
mulrrz_3end 773309352
mulrrz_end 3557508341
mulrrz_i 3710589812
mulrrz_int 53801066
mulsi 610716297
mulsr 117480444
mulss 201178285
mului 1106413735
mulur 928053271
mulur_2 705426946
muluu 4567507765
rtodbl 288662446
shifti 2260243220
sqri 1901014977
sqrr 589177843
sqrs 732247
sqru 626920848
sqrz_i 556358837
truedvmdii 134178890
truedvmdis 131095673
truedvmdsi 6202031
trunc2nr 62676055
usqrt 231679719
vals 2275589036

Generated by: LCOV version 1.16