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

Generated by: LCOV version 1.16