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.16.2 lcov report (development 29115-f22e516b23) Lines: 540 572 94.4 %
Date: 2024-03-28 08:06:56 Functions: 52 53 98.1 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
addmulii 216606699
addmulii_gen 128347539
addmulii_inplace 1947040315
addmulii_lg3 640297571
affrr 1317004938
dblexpo 23630848
dblmantissa 0
dbltor 12819453
div0r 185995
divir 3450229
divrs 9311795
divru 1045572495
divsi 133
divsr 729
divur 2430954
int2n 100721492
int2u 22669217
int2um1 7504
invmod2BIL 60017312
invr 60050411
invr_basecase 60050020
mantissa_real 53400898
modii 2501758388
modiiz 777265
mul0r 950248
mulii 17403873403
mulir 990381430
mulrr 3872696281
mulrrz_3 642129115
mulrrz_3end 758716480
mulrrz_end 3456062342
mulrrz_i 3609537413
mulrrz_int 52342943
mulsi 637701104
mulsr 116221042
mulss 196171022
mului 921421107
mulur 931681487
mulur_2 694758289
muluu 4033126857
rtodbl 284608224
shifti 2162823739
sqri 1801025264
sqrr 570554073
sqrs 1488832
sqru 587916791
sqrz_i 540388465
truedvmdii 129503394
truedvmdis 126272012
truedvmdsi 6197775
trunc2nr 60481739
usqrt 217899427
vals 2189863618

Generated by: LCOV version 1.14