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

Generated by: LCOV version 1.16