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 30483-b6b1f87815) Lines: 535 567 94.4 %
Date: 2025-09-12 09:24:16 Functions: 51 52 98.1 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
addmulii 168634728
addmulii_gen 90739050
addmulii_inplace 1581267060
addmulii_lg3 472693037
affrr 1379296917
dblexpo 26466537
dblmantissa 0
dbltor 13386885
div0r 187460
divir 3501410
divrs 9865363
divru 1113101954
divsi 175
divsr 798
divur 2506984
int2n 105908359
int2u 26153782
int2um1 8831
invmod2BIL 60744252
invr 63109546
invr_basecase 63109488
mantissa_real 53602083
modii 3081101474
mul0r 482278
mulii 20973611066
mulir 987051349
mulrr 3996618741
mulrrz_3 653994119
mulrrz_3end 774443948
mulrrz_end 3600159254
mulrrz_i 3748262489
mulrrz_int 55660756
mulsi 609267822
mulsr 118144146
mulss 201178054
mului 1106307581
mulur 928297118
mulur_2 706328863
muluu 4565476941
rtodbl 289704790
shifti 2269545922
sqri 1911793371
sqrr 594076800
sqrs 732033
sqru 627159374
sqrz_i 561164032
truedvmdii 133947211
truedvmdis 130865413
truedvmdsi 6202031
trunc2nr 62694355
usqrt 231885521
vals 2266166250

Generated by: LCOV version 1.16