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 30530-11e908049b) Lines: 535 567 94.4 %
Date: 2025-10-13 09:22:58 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 482319
sqrs 731364
divur 2509227
divir 3503526
truedvmdsi 6202031
divrs 9869876
dbltor 13388442
int2u 26154656
dblexpo 26477885
mantissa_real 53605531
mulrrz_int 55697010
invmod2BIL 60744902
trunc2nr 62694269
invr_basecase 63110894
invr 63111989
addmulii_gen 90696834
int2n 105932725
mulsr 118070988
truedvmdis 130847514
truedvmdii 133929976
addmulii 168647153
mulss 201177823
usqrt 231549112
rtodbl 289607333
addmulii_lg3 472702910
sqrz_i 561449977
sqrr 594308165
mulsi 609200320
sqru 627334286
mulrrz_3 654311935
mulur_2 706412873
mulrrz_3end 775000823
mulur 928426235
mulir 987079032
mului 1107738382
divru 1113107686
affrr 1379761227
addmulii_inplace 1581177838
sqri 1912411382
vals 2267169705
shifti 2270087398
modii 3083459348
mulrrz_end 3600779828
mulrrz_i 3751124529
mulrr 3999269514
muluu 4562616862
mulii 20973900565

Generated by: LCOV version 1.16