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

Generated by: LCOV version 1.16