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 29451-c474da952c) Lines: 683 719 95.0 %
Date: 2024-07-16 09:03:37 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 1076
pari_kernel_init 1084
incneg 66652
resetloop 174328
diviuuexact 199486
muluui 221699
convi 427414
divis 965809
pari_gmp_free 1733455
setloop 2996970
truncr 3479449
sqrtremi 5100179
xmpn_copy 6679741
floorr 6947231
diviuexact 30744484
divri_with_gmp 35070269
remi2n 36310515
red_montgomery 37317235
icopy_ef 40504197
sqrispec_mirror 41334191
mpz2GEN 54915018
divrr_with_gmp 74638991
divis_rem 83909680
muliispec_mirror 84019764
incpos 99190854
incloop 99599559
absdiviu_rem 109519933
GEN2mpz 109827390
sqrtr_abs 124949766
mantissa2nr 137150009
divrr 140167424
divri 150756372
xmpn_zero 234413987
equaliispec 269938144
int_normalize 292061519
diviuexact_i 370374903
affir 396861252
diviiexact 472018784
roundr_up_ip 520750647
adduispec_offset 575510440
xmpn_mirror 579784152
shiftispec 690089198
xmpn_mirrorcopy 709175976
sqrispec 986319015
umodiu 1189378489
subiuspec 1659524806
dvmdii 1888456553
adduispec 2510835325
subiispec 2860812688
addiispec 3156749141
cmpiispec 3716991569
muluispec 5319259604
muliispec 5659053867

Generated by: LCOV version 1.16