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 30587-f85873d515) Lines: 535 567 94.4 %
Date: 2025-12-29 09:21:39 Functions: 51 52 98.1 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
addmulii 168692642
addmulii_gen 90744049
addmulii_inplace 1581423216
addmulii_lg3 472785577
affrr 1343730783
dblexpo 25892124
dblmantissa 0
dbltor 13383762
div0r 186653
divir 3502243
divrs 9871264
divru 1083983192
divsi 175
divsr 798
divur 2508493
int2n 106040337
int2u 26082657
int2um1 8831
invmod2BIL 60827532
invr 62850769
invr_basecase 62850567
mantissa_real 53751595
modii 3082475569
mul0r 482272
mulii 20977078359
mulir 987118887
mulrr 3956798609
mulrrz_3 652641724
mulrrz_3end 773274255
mulrrz_end 3557216544
mulrrz_i 3710380345
mulrrz_int 53801066
mulsi 610695639
mulsr 117477860
mulss 201178302
mului 1110898777
mulur 928216026
mulur_2 705584376
muluu 4568707970
rtodbl 288678889
shifti 2260294475
sqri 1901434421
sqrr 589113290
sqrs 732033
sqru 626922711
sqrz_i 556282571
truedvmdii 134171629
truedvmdis 131087914
truedvmdsi 6202031
trunc2nr 62673460
usqrt 231797943
vals 2276239442

Generated by: LCOV version 1.16