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 30563-682842a727) Lines: 535 567 94.4 %
Date: 2025-11-29 09:23:24 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 482287
sqrs 732031
divur 2509305
divir 3503627
truedvmdsi 6202031
divrs 9871014
dbltor 13388690
dblexpo 25891121
int2u 26155763
mantissa_real 53609304
mulrrz_int 53800785
invmod2BIL 60743975
trunc2nr 62694631
invr 62836580
invr_basecase 62836624
addmulii_gen 90731163
int2n 105931948
mulsr 117492894
truedvmdis 130871518
truedvmdii 133952103
addmulii 168639412
mulss 201178639
usqrt 231459957
rtodbl 288955723
addmulii_lg3 472689304
sqrz_i 555667894
sqrr 588556370
mulsi 609231992
sqru 626976629
mulrrz_3 652611883
mulur_2 704574917
mulrrz_3end 773212734
mulur 927136417
mulir 985948533
divru 1083740274
mului 1109615168
affrr 1343409835
addmulii_inplace 1581220814
sqri 1912450064
vals 2267336489
shifti 2269232369
modii 3084584853
mulrrz_end 3556320147
mulrrz_i 3709261693
mulrr 3956074262
muluu 4561725475
mulii 20971309009

Generated by: LCOV version 1.16