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-04-26 08:07:25 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 133
divsr 729
int2um1 7504
div0r 186005
modiiz 777259
mul0r 950259
sqrs 1488660
divur 2430956
divir 3450256
truedvmdsi 6197775
divrs 9311773
dbltor 12819205
int2u 22668692
dblexpo 23629672
mulrrz_int 52342943
mantissa_real 53388830
invr_basecase 59974197
invr 59974605
invmod2BIL 60017286
trunc2nr 60481267
int2n 100716582
mulsr 116196985
truedvmdis 126194386
addmulii_gen 128294757
truedvmdii 129426479
mulss 196170643
addmulii 216596219
usqrt 217860886
rtodbl 284466724
sqrz_i 540345207
sqrr 570554506
sqru 587871762
mulsi 636835401
addmulii_lg3 640117196
mulrrz_3 642044922
mulur_2 694445726
mulrrz_3end 758623306
mului 921929031
mulur 931030007
mulir 989734462
divru 1045509185
affrr 1316910973
sqri 1800696517
addmulii_inplace 1946479593
shifti 2162674567
vals 2189801079
modii 2502093592
mulrrz_end 3455553524
mulrrz_i 3608780635
mulrr 3877693457
muluu 4032209361
mulii 17401231296

Generated by: LCOV version 1.14