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

Generated by: LCOV version 1.16