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-16 08:06:46 Functions: 52 53 98.1 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
addmulii 216628136
addmulii_gen 128346900
addmulii_inplace 1947259807
addmulii_lg3 640426959
affrr 1316931339
dblexpo 23630543
dblmantissa 0
dbltor 12819406
div0r 186004
divir 3450247
divrs 9311853
divru 1045530080
divsi 133
divsr 729
divur 2430951
int2n 100721536
int2u 22668823
int2um1 7504
invmod2BIL 60017328
invr 60042432
invr_basecase 60041970
mantissa_real 53393734
modii 2502776317
modiiz 777254
mul0r 950243
mulii 17405641877
mulir 989846870
mulrr 3875992581
mulrrz_3 642097924
mulrrz_3end 758684000
mulrrz_end 3455832691
mulrrz_i 3609070292
mulrrz_int 52342943
mulsi 636855913
mulsr 116198267
mulss 196170813
mului 923142425
mulur 931188632
mulur_2 694664412
muluu 4034030100
rtodbl 284566952
shifti 2163087529
sqri 1801127905
sqrr 570572447
sqrs 1489278
sqru 587928648
sqrz_i 540369424
truedvmdii 129518050
truedvmdis 126286006
truedvmdsi 6197775
trunc2nr 60485398
usqrt 217845373
vals 2189670759

Generated by: LCOV version 1.14