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 30531-d68fd7cb7d) Lines: 535 567 94.4 %
Date: 2025-10-16 09:22:45 Functions: 51 52 98.1 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
addmulii 168628883
addmulii_gen 90727979
addmulii_inplace 1581259386
addmulii_lg3 472687165
affrr 1379886572
dblexpo 26478855
dblmantissa 0
dbltor 13388477
div0r 187460
divir 3503536
divrs 9869871
divru 1113230332
divsi 175
divsr 798
divur 2509227
int2n 105934503
int2u 26154668
int2um1 8831
invmod2BIL 60744897
invr 63130332
invr_basecase 63128875
mantissa_real 53608104
modii 3083260122
mul0r 482286
mulii 20971304973
mulir 986912943
mulrr 3997522988
mulrrz_3 654338356
mulrrz_3end 775025081
mulrrz_end 3600969027
mulrrz_i 3751252236
mulrrz_int 55697010
mulsi 609209321
mulsr 118071979
mulss 201178374
mului 1107523758
mulur 928241551
mulur_2 706252894
muluu 4562236708
rtodbl 289629872
shifti 2270106570
sqri 1912700040
sqrr 594329279
sqrs 732219
sqru 627339819
sqrz_i 561485260
truedvmdii 133941427
truedvmdis 130859046
truedvmdsi 6202031
trunc2nr 62696664
usqrt 231744479
vals 2267532787

Generated by: LCOV version 1.16