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 29950-285c5b69ed) Lines: 540 572 94.4 %
Date: 2025-02-05 09:09:51 Functions: 52 53 98.1 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
dblmantissa 0
divsi 168
divsr 798
int2um1 7644
div0r 186460
mul0r 473673
modiiz 782235
sqrs 1506070
divur 2494741
divir 3494916
truedvmdsi 6202031
divrs 9809399
dbltor 13389305
int2u 25543414
dblexpo 26038194
mantissa_real 52651961
mulrrz_int 54415513
invmod2BIL 60679300
invr_basecase 62397745
invr 62397951
trunc2nr 62574405
addmulii_gen 90938160
int2n 102198247
mulsr 116557708
truedvmdis 129019312
truedvmdii 132163608
addmulii 166918130
mulss 201097431
usqrt 228448252
rtodbl 288055536
addmulii_lg3 466778837
sqrz_i 559218358
sqrr 591669229
mulsi 603709715
sqru 606514324
mulrrz_3 650903891
mulur_2 701764151
mulrrz_3end 770772466
mului 917064917
mulur 919276554
mulir 978049101
divru 1095299142
affrr 1358215627
addmulii_inplace 1568061860
sqri 1829841640
vals 2200456116
shifti 2230117408
modii 2561196961
mulrrz_end 3552206033
mulrrz_i 3698373609
mulrr 3942906021
muluu 4408528076
mulii 20670612953

Generated by: LCOV version 1.16