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 29712-7c8a932571) Lines: 683 719 95.0 %
Date: 2024-11-15 09:08:45 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 1080
pari_kernel_init 1088
incneg 66652
resetloop 174328
diviuuexact 199459
muluui 221678
convi 436578
divis 968390
pari_gmp_free 1735631
setloop 2997416
truncr 3547949
sqrtremi 5113123
xmpn_copy 6870591
floorr 6979807
diviuexact 31132957
divri_with_gmp 35159239
remi2n 36053563
red_montgomery 36697338
icopy_ef 40943020
sqrispec_mirror 41356015
mpz2GEN 57409677
divrr_with_gmp 75538838
muliispec_mirror 83612523
divis_rem 85137906
incpos 98878835
incloop 99284033
absdiviu_rem 111061339
GEN2mpz 114816497
sqrtr_abs 124940749
mantissa2nr 136975092
divrr 141334921
divri 150108476
xmpn_zero 235407136
equaliispec 272728078
int_normalize 302980427
diviuexact_i 379173547
affir 399694298
diviiexact 495799453
roundr_up_ip 519933416
adduispec_offset 580702061
xmpn_mirror 581812796
shiftispec 699107283
xmpn_mirrorcopy 710964349
sqrispec 987582431
umodiu 1286738803
subiuspec 1718825161
dvmdii 1906087603
adduispec 2579118256
subiispec 2943886298
addiispec 3255942127
cmpiispec 3816092491
muluispec 5431906501
muliispec 5765046644

Generated by: LCOV version 1.16