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 |
 |
|
|
 |
|
|
|
|
|
|
|
|
File  |
Line Coverage  |
Function Coverage  |
| Rate |
Total |
Hit |
Rate |
Total |
Hit |
| anal.c |
|
89.5 % |
695 |
622 |
92.1 % |
101 |
93 |
| compile.c |
|
90.0 % |
1811 |
1630 |
96.7 % |
92 |
89 |
| default.c |
|
64.3 % |
589 |
379 |
64.3 % |
70 |
45 |
| es.c |
|
71.8 % |
2798 |
2008 |
80.0 % |
310 |
248 |
| eval.c |
|
69.3 % |
1920 |
1330 |
75.6 % |
156 |
118 |
| forprime.c |
|
87.1 % |
529 |
461 |
95.2 % |
42 |
40 |
| gplib.c |
|
55.7 % |
1032 |
575 |
65.4 % |
104 |
68 |
| hash.c |
|
91.2 % |
250 |
228 |
97.5 % |
40 |
39 |
| init.c |
|
76.5 % |
1488 |
1139 |
81.4 % |
161 |
131 |
| intnum.c |
|
97.1 % |
1634 |
1587 |
99.2 % |
133 |
132 |
| members.c |
|
98.5 % |
335 |
330 |
100.0 % |
55 |
55 |
| parse.c |
|
78.3 % |
563 |
441 |
87.5 % |
8 |
7 |
| parse.y |
|
93.4 % |
122 |
114 |
- |
|
|
| parsec.h |
|
97.1 % |
103 |
100 |
100.0 % |
17 |
17 |
| readline.c |
|
0.0 % |
186 |
|
0.0 % |
17 |
|
| str.c |
|
90.1 % |
131 |
118 |
93.3 % |
15 |
14 |
| sumiter.c |
|
94.8 % |
1303 |
1235 |
99.1 % |
107 |
106 |