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 30532-0c728fd268) Lines: 535 567 94.4 %
Date: 2025-10-20 09:22:51 Functions: 51 52 98.1 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
addmulii 168637357
addmulii_gen 90726148
addmulii_inplace 1581237200
addmulii_lg3 472681174
affrr 1379890990
dblexpo 26476679
dblmantissa 0
dbltor 13388836
div0r 187451
divir 3503514
divrs 9869944
divru 1113198201
divsi 175
divsr 798
divur 2509221
int2n 105935605
int2u 26154731
int2um1 8831
invmod2BIL 60744911
invr 63124139
invr_basecase 63122906
mantissa_real 53606895
modii 3083541911
mul0r 482302
mulii 20972798484
mulir 986969008
mulrr 3997075354
mulrrz_3 654357073
mulrrz_3end 775058312
mulrrz_end 3600647117
mulrrz_i 3751332788
mulrrz_int 55697034
mulsi 609225897
mulsr 118067787
mulss 201177887
mului 1107621990
mulur 928340905
mulur_2 706363406
muluu 4562074328
rtodbl 289632640
shifti 2270163415
sqri 1912760607
sqrr 594308985
sqrs 731519
sqru 627337903
sqrz_i 561471370
truedvmdii 133954263
truedvmdis 130871679
truedvmdsi 6202031
trunc2nr 62697522
usqrt 231748630
vals 2266921150

Generated by: LCOV version 1.16