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 30504-e6f76a2795) Lines: 535 567 94.4 %
Date: 2025-09-29 09:23:05 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 482288
sqrs 731360
divur 2509154
divir 3503535
truedvmdsi 6202031
divrs 9869635
dbltor 13387522
int2u 26154190
dblexpo 26478814
mantissa_real 53606884
mulrrz_int 55696529
invmod2BIL 60744898
trunc2nr 62691575
invr_basecase 63126963
invr 63127673
addmulii_gen 90721260
int2n 105933845
mulsr 118164880
truedvmdis 130860798
truedvmdii 133943961
addmulii 168631983
mulss 201177936
usqrt 231448763
rtodbl 289703124
addmulii_lg3 472667876
sqrz_i 561436079
sqrr 594231301
mulsi 609230925
sqru 627322713
mulrrz_3 654400683
mulur_2 706182718
mulrrz_3end 775105883
mulur 928267727
mulir 986986326
mului 1107254502
divru 1113245496
affrr 1379697296
addmulii_inplace 1581213824
sqri 1912640543
vals 2266895235
shifti 2270309474
modii 3082955346
mulrrz_end 3601482738
mulrrz_i 3751995216
mulrr 3997849196
muluu 4563204752
mulii 20974739880

Generated by: LCOV version 1.16