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

Generated by: LCOV version 1.14