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 |
|
89.4 % |
618 / 691 |
91.1 % |
92 / 101 |
compile.c |
|
89.9 % |
1569 / 1746 |
97.7 % |
86 / 88 |
default.c |
|
61.6 % |
349 / 567 |
61.2 % |
41 / 67 |
es.c |
|
60.4 % |
1655 / 2741 |
64.2 % |
197 / 307 |
eval.c |
|
68.4 % |
1224 / 1789 |
75.8 % |
113 / 149 |
forprime.c |
|
84.4 % |
407 / 482 |
87.2 % |
34 / 39 |
gplib.c |
|
53.2 % |
488 / 918 |
63.8 % |
60 / 94 |
hash.c |
|
87.4 % |
160 / 183 |
96.8 % |
30 / 31 |
init.c |
|
72.8 % |
1056 / 1450 |
78.0 % |
124 / 159 |
intnum.c |
|
97.4 % |
1490 / 1529 |
98.4 % |
122 / 124 |
members.c |
|
98.8 % |
321 / 325 |
100.0 % |
54 / 54 |
parse.c |
|
75.2 % |
392 / 521 |
100.0 % |
5 / 5 |
parse.y |
|
94.0 % |
110 / 117 |
- |
0 / 0 |
parsec.h |
|
95.1 % |
98 / 103 |
100.0 % |
17 / 17 |
readline.c |
|
0.0 % |
0 / 186 |
0.0 % |
0 / 17 |
str.c |
|
100.0 % |
107 / 107 |
100.0 % |
14 / 14 |
sumiter.c |
|
96.7 % |
1158 / 1197 |
99.0 % |
101 / 102 |