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 29451-c474da952c) Lines: 540 572 94.4 %
Date: 2024-07-16 09:03:37 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 770
int2um1 7504
div0r 186019
modiiz 776680
mul0r 1002538
sqrs 1488496
divur 2491245
divir 3494115
truedvmdsi 6197775
divrs 9798621
dbltor 13245760
int2u 23067696
dblexpo 26092988
mantissa_real 53169563
mulrrz_int 54482732
invmod2BIL 58340419
invr_basecase 61751693
invr 61752158
trunc2nr 62276211
addmulii_gen 86920143
int2n 100939341
mulsr 116226791
truedvmdis 126835513
truedvmdii 129940237
addmulii 166726654
mulss 201097467
usqrt 228852540
rtodbl 286676607
addmulii_lg3 444749499
sqrz_i 560714563
sqrr 592251959
sqru 604763348
mulsi 609004001
mulrrz_3 649796495
mulur_2 701208358
mulrrz_3end 769302130
mului 913721481
mulur 918999129
mulir 978165159
divru 1095747290
affrr 1355629526
addmulii_inplace 1498584168
sqri 1830174246
vals 2181954532
shifti 2196061766
modii 2508914530
mulrrz_end 3533227375
mulrrz_i 3676308319
mulrr 3922285757
muluu 4298168766
mulii 18969428678

Generated by: LCOV version 1.16