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 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.10.0 lcov report (development 19823-d80e022) Lines: 639 716 89.2 %
Date: 2016-12-03 05:49:13 Functions: 53 54 98.1 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
GEN2mpz 223529041
addiispec 1411799021
adduispec 1080556221
adduispec_offset 318608687
addumului 759665
affir 100452939
cmpiispec 1753333240
convi 486112
diviiexact 231420318
divis 471143
divis_rem 29942181
diviu_rem 125634714
diviuexact 244193737
diviuuexact 513237
divri 17750481
divri_with_gmp 3593978
divrr 82456562
divrr_with_gmp 31731208
dvmdii 805345783
equaliispec 55330780
floorr 441499
icopy_ef 19943831
incloop 32671699
incneg 6184
incpos 32665445
int_normalize 145157348
mantissa2nr 21959132
mpz2GEN 212761387
muliispec 1832496249
muliispec_mirror 62794681
muluispec 1950660381
muluui 535445
pari_gmp_free 202793
pari_gmp_realloc 0
pari_kernel_close 1284
pari_kernel_init 776
red_montgomery 6711901
remi2n 10056411
resetloop 156748
roundr_up_ip 266169333
setloop 2412749
shiftispec 340352746
sqrispec 640219712
sqrispec_mirror 4837347
sqrtr_abs 21712691
sqrtremi 2658920
subiispec 1418819808
subiuspec 814334731
truncr 1485907
umodiu 774334220
xmpn_copy 1277613
xmpn_mirror 179546301
xmpn_mirrorcopy 273911998
xmpn_zero 57037877

Generated by: LCOV version 1.11