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:
- with GMP kernel
- with GMP kernel using --mt=pthread
- with native kernel, including micro-assembler code
- with native kernel, without micro-assembler
- with native kernel, without micro-assembler, disabling GCC extensions
(DISABLE_INLINE)
- with GMP kernel, emulating an
x86_32
architecture at
Configure time via setarch
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 |
|
|
|
|
|
|
|
|
|
Filename |
Line Coverage |
Functions |
anal.c |
|
91.8 % |
636 / 693 |
94.1 % |
95 / 101 |
compile.c |
|
90.4 % |
1608 / 1779 |
96.7 % |
88 / 91 |
default.c |
|
63.1 % |
373 / 591 |
62.9 % |
44 / 70 |
es.c |
|
73.8 % |
2054 / 2783 |
81.9 % |
254 / 310 |
eval.c |
|
68.9 % |
1298 / 1884 |
75.3 % |
116 / 154 |
forprime.c |
|
87.1 % |
444 / 510 |
94.7 % |
36 / 38 |
gplib.c |
|
56.1 % |
572 / 1020 |
66.0 % |
68 / 103 |
hash.c |
|
87.9 % |
167 / 190 |
96.9 % |
31 / 32 |
init.c |
|
76.9 % |
1151 / 1496 |
83.3 % |
135 / 162 |
intnum.c |
|
97.0 % |
1584 / 1633 |
99.2 % |
132 / 133 |
members.c |
|
98.5 % |
330 / 335 |
100.0 % |
55 / 55 |
parse.c |
|
77.0 % |
424 / 551 |
87.5 % |
7 / 8 |
parse.y |
|
94.9 % |
111 / 117 |
- |
0 / 0 |
parsec.h |
|
95.1 % |
98 / 103 |
100.0 % |
17 / 17 |
readline.c |
|
0.0 % |
0 / 185 |
0.0 % |
0 / 17 |
str.c |
|
89.5 % |
111 / 124 |
93.3 % |
14 / 15 |
sumiter.c |
|
95.1 % |
1233 / 1297 |
100.0 % |
105 / 105 |