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/gmp - mp.c (source / functions) Hit Total Coverage
Test: PARI/GP v2.18.0 lcov report (development 29806-4d001396c7) Lines: 683 719 95.0 %
Date: 2024-12-22 09:08:28 Functions: 54 56 96.4 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
addumului 0
pari_gmp_realloc 0
pari_kernel_version 4
pari_kernel_close 1088
pari_kernel_init 1096
incneg 66652
resetloop 174328
diviuuexact 199446
muluui 221677
convi 437050
divis 968386
pari_gmp_free 1736821
setloop 2997431
truncr 3551534
sqrtremi 5113250
xmpn_copy 6871143
floorr 6983392
diviuexact 31141337
divri_with_gmp 35161707
remi2n 36111028
red_montgomery 36683084
icopy_ef 40886315
sqrispec_mirror 41348889
mpz2GEN 57417118
divrr_with_gmp 75716382
muliispec_mirror 83800237
divis_rem 85131929
incpos 98890615
incloop 99294931
absdiviu_rem 111106544
GEN2mpz 114831574
sqrtr_abs 125136625
mantissa2nr 137110912
divrr 141576897
divri 150164670
xmpn_zero 235742589
equaliispec 272691997
int_normalize 303420407
diviuexact_i 389246706
affir 399658316
diviiexact 505867608
roundr_up_ip 520905229
adduispec_offset 580878556
xmpn_mirror 581962660
shiftispec 704631931
xmpn_mirrorcopy 711835685
sqrispec 987763176
umodiu 1287583398
subiuspec 1723276552
dvmdii 1907544614
adduispec 2588703379
subiispec 2948190543
addiispec 3264211661
cmpiispec 3832535375
muluispec 5457404150
muliispec 5792067729

Generated by: LCOV version 1.16