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

Generated by: LCOV version 1.16