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-25 08:08:21 Functions: 52 53 98.1 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
addmulii 216606027
addmulii_gen 128321206
addmulii_inplace 1946841396
addmulii_lg3 640265649
affrr 1316931409
dblexpo 23631704
dblmantissa 0
dbltor 12819230
div0r 186002
divir 3450247
divrs 9311793
divru 1045533560
divsi 133
divsr 729
divur 2430952
int2n 100721900
int2u 22668958
int2um1 7504
invmod2BIL 60017330
invr 60016437
invr_basecase 60016052
mantissa_real 53394793
modii 2502236355
modiiz 777276
mul0r 950224
mulii 17404696747
mulir 989972171
mulrr 3875871183
mulrrz_3 642140702
mulrrz_3end 758728986
mulrrz_end 3455716331
mulrrz_i 3609249763
mulrrz_int 52342943
mulsi 637190174
mulsr 116210822
mulss 196170509
mului 922641708
mulur 931292811
mulur_2 694561282
muluu 4033782878
rtodbl 284535993
shifti 2162835786
sqri 1800890247
sqrr 570548190
sqrs 1488451
sqru 587902394
sqrz_i 540361434
truedvmdii 129472730
truedvmdis 126240994
truedvmdsi 6197775
trunc2nr 60484467
usqrt 218044528
vals 2189796468

Generated by: LCOV version 1.14