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 30318-7d854b8994) Lines: 535 567 94.4 %
Date: 2025-06-06 09:19:58 Functions: 51 52 98.1 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
addmulii 167032693
addmulii_gen 90719680
addmulii_inplace 1568263397
addmulii_lg3 467018820
affrr 1370262305
dblexpo 26351609
dblmantissa 0
dbltor 13362839
div0r 186271
divir 3491961
divrs 9823222
divru 1106497331
divsi 175
divsr 798
divur 2491779
int2n 105929835
int2u 25561292
int2um1 8831
invmod2BIL 60535309
invr 62475505
invr_basecase 62475283
mantissa_real 52693538
modii 3061090036
mul0r 473893
mulii 21012928653
mulir 978724811
mulrr 3962124557
mulrrz_3 651994558
mulrrz_3end 772219934
mulrrz_end 3569461067
mulrrz_i 3717515341
mulrrz_int 55648770
mulsi 603887990
mulsr 117460213
mulss 201149556
mului 934019383
mulur 920029410
mulur_2 703065301
muluu 4547227484
rtodbl 288521462
shifti 2238445467
sqri 1887918987
sqrr 592093229
sqrs 1499840
sqru 614340702
sqrz_i 559401072
truedvmdii 132306608
truedvmdis 129163869
truedvmdsi 6202031
trunc2nr 62647903
usqrt 228819411
vals 2218447207

Generated by: LCOV version 1.16