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.16.2 lcov report (development 29115-f22e516b23) Lines: 683 719 95.0 %
Date: 2024-05-07 08:07:52 Functions: 54 56 96.4 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
GEN2mpz 111115961
absdiviu_rem 109976614
addiispec 3103468486
adduispec 2439844145
adduispec_offset 574347016
addumului 0
affir 389821499
cmpiispec 3543535704
convi 423651
diviiexact 494296920
divis 958767
divis_rem 83520170
diviuexact 30310911
diviuexact_i 375299802
diviuuexact 199491
divri 139057623
divri_with_gmp 34823256
divrr 136558910
divrr_with_gmp 73376781
dvmdii 1765304101
equaliispec 260779982
floorr 6963220
icopy_ef 44174674
incloop 100897526
incneg 66652
incpos 100489410
int_normalize 292060122
mantissa2nr 132971848
mpz2GEN 55559282
muliispec 5283796003
muliispec_mirror 82440505
muluispec 5024171733
muluui 221696
pari_gmp_free 1739260
pari_gmp_realloc 0
pari_kernel_close 1064
pari_kernel_init 1072
pari_kernel_version 4
red_montgomery 37400442
remi2n 36398962
resetloop 174328
roundr_up_ip 516648337
setloop 2996869
shiftispec 691529683
sqrispec 976982807
sqrispec_mirror 32814779
sqrtr_abs 119887413
sqrtremi 5096942
subiispec 2793056546
subiuspec 1587869748
truncr 3508243
umodiu 1183009744
xmpn_copy 7125727
xmpn_mirror 559860214
xmpn_mirrorcopy 686574733
xmpn_zero 227843894

Generated by: LCOV version 1.14