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

Generated by: LCOV version 1.16