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 30317-3ce82218f7) Lines: 535 567 94.4 %
Date: 2025-06-05 09:19:38 Functions: 51 52 98.1 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
addmulii 167033846
addmulii_gen 90713003
addmulii_inplace 1568353708
addmulii_lg3 467046702
affrr 1370366895
dblexpo 26351303
dblmantissa 0
dbltor 13363308
div0r 186271
divir 3491968
divrs 9823318
divru 1106429992
divsi 175
divsr 798
divur 2491781
int2n 105931657
int2u 25561803
int2um1 8831
invmod2BIL 60535330
invr 62469785
invr_basecase 62469741
mantissa_real 52690689
modii 3060926280
mul0r 473879
mulii 21014158899
mulir 978713542
mulrr 3962234250
mulrrz_3 652145234
mulrrz_3end 772410223
mulrrz_end 3569349450
mulrrz_i 3717707383
mulrrz_int 55648794
mulsi 603902771
mulsr 117463524
mulss 201149528
mului 933073273
mulur 920023765
mulur_2 703040727
muluu 4548766059
rtodbl 288552964
shifti 2238727139
sqri 1888384038
sqrr 592086149
sqrs 1499799
sqru 614378920
sqrz_i 559412238
truedvmdii 132310162
truedvmdis 129167104
truedvmdsi 6202031
trunc2nr 62651411
usqrt 228605390
vals 2218877943

Generated by: LCOV version 1.16