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 30416-79cded4af3) Lines: 535 567 94.4 %
Date: 2025-07-26 09:23:16 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 482275
sqrs 1540944
divur 2500527
divir 3501401
truedvmdsi 6202031
divrs 9961807
dbltor 13374063
int2u 25979866
dblexpo 26510717
mantissa_real 53495656
mulrrz_int 55660619
invmod2BIL 60685088
trunc2nr 62683083
invr_basecase 63088842
invr 63089233
addmulii_gen 90693713
int2n 105874537
mulsr 118194603
truedvmdis 130815528
truedvmdii 133895956
addmulii 168635710
mulss 201175997
usqrt 231701250
rtodbl 290033072
addmulii_lg3 472275398
sqrz_i 561132601
sqrr 594153839
mulsi 604768526
sqru 623733152
mulrrz_3 654777768
mulur_2 705656827
mulrrz_3end 775140581
mulur 927258012
mului 947091657
mulir 986049964
divru 1113298632
affrr 1379293103
addmulii_inplace 1575249030
sqri 1906178204
vals 2252299145
shifti 2258214618
modii 3080298905
mulrrz_end 3598268020
mulrrz_i 3746676451
mulrr 3997532110
muluu 4565551829
mulii 21113002228

Generated by: LCOV version 1.16