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
addmulii 168647153
addmulii_gen 90696834
addmulii_inplace 1581177838
addmulii_lg3 472702910
affrr 1379761227
dblexpo 26477885
dblmantissa 0
dbltor 13388442
div0r 187456
divir 3503526
divrs 9869876
divru 1113107686
divsi 175
divsr 798
divur 2509227
int2n 105932725
int2u 26154656
int2um1 8831
invmod2BIL 60744902
invr 63111989
invr_basecase 63110894
mantissa_real 53605531
modii 3083459348
mul0r 482319
mulii 20973900565
mulir 987079032
mulrr 3999269514
mulrrz_3 654311935
mulrrz_3end 775000823
mulrrz_end 3600779828
mulrrz_i 3751124529
mulrrz_int 55697010
mulsi 609200320
mulsr 118070988
mulss 201177823
mului 1107738382
mulur 928426235
mulur_2 706412873
muluu 4562616862
rtodbl 289607333
shifti 2270087398
sqri 1912411382
sqrr 594308165
sqrs 731364
sqru 627334286
sqrz_i 561449977
truedvmdii 133929976
truedvmdis 130847514
truedvmdsi 6202031
trunc2nr 62694269
usqrt 231549112
vals 2267169705

Generated by: LCOV version 1.16