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.1 lcov report (development 28676-df828f1c94) Lines: 647 719 90.0 %
Date: 2023-08-26 07:54:43 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 1052
pari_kernel_init 1060
incneg 34652
resetloop 174328
diviuuexact 200542
muluui 222302
convi 422657
divis 952924
pari_gmp_free 1690469
setloop 2987545
truncr 3393908
floorr 3524591
sqrtremi 4454725
xmpn_copy 7264080
remi2n 28373276
diviuexact 29086963
divri_with_gmp 33263015
red_montgomery 33907088
icopy_ef 41615435
mpz2GEN 42940623
sqrispec_mirror 45841926
divis_rem 77740890
muliispec_mirror 79469204
GEN2mpz 85878170
divrr_with_gmp 94523212
mantissa2nr 100339871
incpos 100442032
incloop 100815836
absdiviu_rem 101619679
sqrtr_abs 102821347
divrr 112303991
divri 139334855
xmpn_zero 230376412
equaliispec 252382842
int_normalize 275133003
affir 380891679
diviuexact_i 381113296
roundr_up_ip 409433709
diviiexact 486357045
xmpn_mirror 543966875
adduispec_offset 572459807
shiftispec 632488936
xmpn_mirrorcopy 717860258
sqrispec 968869771
umodiu 1160365421
subiuspec 1669599296
dvmdii 1757877425
adduispec 2445037393
subiispec 3119765758
addiispec 3289468527
cmpiispec 3810825697
muluispec 4787955667
muliispec 4994813568

Generated by: LCOV version 1.14