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 |
|
91.0 % |
1596 / 1753 |
97.8 % |
88 / 90 |
default.c |
|
62.5 % |
356 / 570 |
62.7 % |
42 / 67 |
es.c |
|
74.6 % |
2069 / 2774 |
82.3 % |
255 / 310 |
eval.c |
|
69.9 % |
1255 / 1795 |
77.0 % |
114 / 148 |
forprime.c |
|
85.0 % |
435 / 512 |
85.7 % |
36 / 42 |
gplib.c |
|
54.7 % |
522 / 955 |
64.9 % |
63 / 97 |
hash.c |
|
87.4 % |
160 / 183 |
96.8 % |
30 / 31 |
init.c |
|
77.5 % |
1159 / 1495 |
84.0 % |
136 / 162 |
intnum.c |
|
97.0 % |
1575 / 1624 |
98.5 % |
131 / 133 |
members.c |
|
98.5 % |
326 / 331 |
100.0 % |
54 / 54 |
parse.c |
|
74.8 % |
412 / 551 |
87.5 % |
7 / 8 |
parse.y |
|
94.1 % |
111 / 118 |
- |
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 % |
111 / 111 |
100.0 % |
14 / 14 |
sumiter.c |
|
94.9 % |
1237 / 1303 |
99.1 % |
105 / 106 |