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 30587-f85873d515) Lines: 535 567 94.4 %
Date: 2025-12-28 09:21:53 Functions: 51 52 98.1 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
addmulii 168693759
addmulii_gen 90734334
addmulii_inplace 1581366758
addmulii_lg3 472790994
affrr 1343871410
dblexpo 25892105
dblmantissa 0
dbltor 13383621
div0r 186656
divir 3502246
divrs 9871281
divru 1083999859
divsi 175
divsr 798
divur 2508494
int2n 106041820
int2u 26082639
int2um1 8831
invmod2BIL 60827514
invr 62856283
invr_basecase 62855945
mantissa_real 53754594
modii 3082019709
mul0r 482324
mulii 20975636036
mulir 986854878
mulrr 3957432860
mulrrz_3 652768730
mulrrz_3end 773433520
mulrrz_end 3557374463
mulrrz_i 3710830538
mulrrz_int 53801066
mulsi 610696489
mulsr 117483618
mulss 201178779
mului 1110607869
mulur 928092399
mulur_2 705494601
muluu 4568826469
rtodbl 288686609
shifti 2260178448
sqri 1901086377
sqrr 589166130
sqrs 732904
sqru 626915003
sqrz_i 556349807
truedvmdii 134161581
truedvmdis 131078630
truedvmdsi 6202031
trunc2nr 62676494
usqrt 231755886
vals 2275732090

Generated by: LCOV version 1.16