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 30499-74bdd0ac5b) Lines: 535 567 94.4 %
Date: 2025-09-16 09:24:07 Functions: 51 52 98.1 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
addmulii 168630983
addmulii_gen 90736235
addmulii_inplace 1581283119
addmulii_lg3 472699511
affrr 1379752038
dblexpo 26479178
dblmantissa 0
dbltor 13387344
div0r 187460
divir 3503537
divrs 9869611
divru 1113270836
divsi 175
divsr 798
divur 2509148
int2n 105934672
int2u 26154413
int2um1 8831
invmod2BIL 60744225
invr 63132267
invr_basecase 63131854
mantissa_real 53610993
modii 3082593941
mul0r 482287
mulii 20973487960
mulir 987212616
mulrr 3998335978
mulrrz_3 654222782
mulrrz_3end 774755562
mulrrz_end 3601722090
mulrrz_i 3750518143
mulrrz_int 55696529
mulsi 609242592
mulsr 118156642
mulss 201178902
mului 1108859674
mulur 928358178
mulur_2 706277606
muluu 4563067180
rtodbl 289756526
shifti 2270167057
sqri 1912145206
sqrr 594379024
sqrs 732044
sqru 627359118
sqrz_i 561459269
truedvmdii 133948961
truedvmdis 130869819
truedvmdsi 6202031
trunc2nr 62694700
usqrt 231572855
vals 2266785856

Generated by: LCOV version 1.16