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:

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
Current view: top level - basemath - Flv.c (source / functions) Hit Total Coverage
Test: PARI/GP v2.18.1 lcov report (development 30670-52869c8c38) Lines: 737 758 97.2 %
Date: 2026-02-05 09:23:49 Functions: 58 62 93.5 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
Flm_deplin 0
Flm_det 0
Flm_intersect 0
Flm_to_ZM_inplace 0
Flc_to_ZC_inplace 14
Flm_Flc_gauss 21
Flm_invimage_CUP 287
Flm_inv_upper_1 490
Flm_invimage 889
Flm_invimage_i 931
Flm_inv_upper_1_ind 1274
Flm_inv_sp 1827
Flm_det_gauss_OK 2317
Flm_deplin_echelon 30745
Flm_det_CUP 37414
Flm_rank 39788
Flm_det_gauss 53463
Flm_inv 63635
Flm_inv_i 65462
Flm_det_i 90877
Flm_det_sp 90877
Flm_gauss_sp_OK 122608
Flm_Flc_invimage 139971
Flm_gauss_CUP 169289
Flm_intersect_i 272399
Flm_pivots_CUP 277469
Flm_ker_echelon 324421
Flv_to_ZV 388512
Fl_get_col_OK 455868
Flm_ker_sp 556255
Flm_ker 580243
_Fl_add 680510
Flm_ker_gauss_OK 699427
Flm_ker_gauss 781332
Flm_adjoint 927036
indexcompl 1076021
Flm_gauss_from_CUP 1096279
Flm_ker_i 1136498
Flm_echelon_gauss 1161624
Flm_solve_upper_1 1828146
Flm_lsolve_lower_unit_2 1954505
Flm_echelon_pre 1966479
_Fl_add_OK 2273071
Flm_gauss 2412186
Flm_gauss_sp_i 2429948
Fl_get_col 2432129
Flm_gauss_sp 2478377
Flm_lsolve_upper_2 2632884
Flm_rsolve_upper_2 2866945
Flm_CUP_pre 3551376
Flm_CUP_basecase 3643060
_Fl_addmul_OK 4460280
Flm_gauss_pivot 4495151
Flm_lsolve_lower_unit_pre 4541557
Flm_pivots 4772602
Flm_rsolve_lower_unit_2 4890201
Flm_lsolve_upper_pre 5652240
Flm_rsolve_upper_pre 6862965
Flm_rsolve_lower_unit_pre 11199854
Flm_to_ZM 11836263
_Fl_addmul 12622126
Flc_to_ZC 30231823

Generated by: LCOV version 1.16