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 30561-4f4869c0e7) Lines: 535 567 94.4 %
Date: 2025-11-28 09:21:39 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 187456
mul0r 482301
sqrs 732212
divur 2509317
divir 3503619
truedvmdsi 6202031
divrs 9871143
dbltor 13389038
dblexpo 25894167
int2u 26156109
mantissa_real 53612358
mulrrz_int 53800785
invmod2BIL 60743987
trunc2nr 62694043
invr_basecase 62845298
invr 62846272
addmulii_gen 90743663
int2n 105937891
mulsr 117511320
truedvmdis 130864202
truedvmdii 133947374
addmulii 168632223
mulss 201178795
usqrt 231959600
rtodbl 288935389
addmulii_lg3 472709669
sqrz_i 555701968
sqrr 588538840
mulsi 609230092
sqru 626958868
mulrrz_3 652610033
mulur_2 704731388
mulrrz_3end 773299802
mulur 927257924
mulir 985951357
divru 1083731507
mului 1109021366
affrr 1343459261
addmulii_inplace 1581354492
sqri 1912219250
vals 2267278138
shifti 2269373004
modii 3083581001
mulrrz_end 3556035875
mulrrz_i 3709970601
mulrr 3955879120
muluu 4564693579
mulii 20976345409

Generated by: LCOV version 1.16