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 |
| level1.h |
|
88.5 % |
684 |
605 |
89.6 % |
241 |
216 |
| ratlift.c |
|
90.7 % |
108 |
98 |
100.0 % |
3 |
3 |
| mp_indep.c |
|
94.3 % |
562 |
530 |
96.2 % |
52 |
50 |
| cmp.c |
|
95.8 % |
71 |
68 |
100.0 % |
7 |
7 |
| mp.c |
|
96.6 % |
1153 |
1114 |
97.1 % |
70 |
68 |
| gcdext.c |
|
97.6 % |
125 |
122 |
100.0 % |
4 |
4 |
| invmod.c |
|
98.0 % |
51 |
50 |
100.0 % |
2 |
2 |
| halfgcd.c |
|
98.2 % |
219 |
215 |
100.0 % |
20 |
20 |
| gcdll.c |
|
99.4 % |
340 |
338 |
100.0 % |
14 |
14 |
| bfffo.h |
|
100.0 % |
8 |
8 |
100.0 % |
1 |
1 |
| addll.h |
|
100.0 % |
16 |
16 |
100.0 % |
4 |
4 |
| mulll.h |
|
100.0 % |
25 |
25 |
100.0 % |
2 |
2 |
| divll.h |
|
100.0 % |
34 |
34 |
100.0 % |
1 |
1 |
| divll_pre.h |
|
100.0 % |
48 |
48 |
100.0 % |
5 |
5 |
| gcd.c |
|
100.0 % |
66 |
66 |
100.0 % |
4 |
4 |
| add.c |
|
100.0 % |
187 |
187 |
100.0 % |
10 |
10 |