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

Function Name Sort by function name Hit count Sort by hit count
addmulii 216618488
addmulii_gen 128344248
addmulii_inplace 1947221894
addmulii_lg3 640391543
affrr 1317065795
dblexpo 23631812
dblmantissa 0
dbltor 12819407
div0r 186004
divir 3450249
divrs 9311821
divru 1045621187
divsi 133
divsr 729
divur 2430952
int2n 100723158
int2u 22668950
int2um1 7504
invmod2BIL 60017323
invr 60047120
invr_basecase 60046753
mantissa_real 53396850
modii 2502308887
modiiz 777262
mul0r 950261
mulii 17405524398
mulir 990068678
mulrr 3874527355
mulrrz_3 642130010
mulrrz_3end 758695147
mulrrz_end 3456145000
mulrrz_i 3609576385
mulrrz_int 52342943
mulsi 637248097
mulsr 116213106
mulss 196170071
mului 922378731
mulur 931390856
mulur_2 694668823
muluu 4034679839
rtodbl 284576840
shifti 2162951919
sqri 1801069942
sqrr 570572388
sqrs 1487856
sqru 587913843
sqrz_i 540407369
truedvmdii 129506294
truedvmdis 126274392
truedvmdsi 6197775
trunc2nr 60485008
usqrt 218116595
vals 2189754420

Generated by: LCOV version 1.14