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 - nffactor.c (source / functions) Hit Total Coverage
Test: PARI/GP v2.18.1 lcov report (development 30622-caa25a75db) Lines: 1223 1314 93.1 %
Date: 2026-01-22 09:18:00 Functions: 75 79 94.9 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
FlxqXQV_fixedalg 0
FpC_ratlift 5199179
FpM_ratlift 2720647
FpX_ratlift 356947
FqX_centermod 48914
QXQX_gcd 3003
QXQX_normalize 34374
RgX_galconj_bound 63
RgX_int_normalize 33122
ZXQX_gcd 5264
ZXirred_is_cyclo_translate 2788
ZqX 17041
ZqX_normalize 17006
_norml2 448401
arch_for_T2 183039
bestlift_bound 17041
bestlift_init 17041
cmbf_maxK 105445
ensure_lt_INT 33048
fact_from_sqff 11347
fix_nf 32885
fixedalg_order 0
get_Bhigh 10940
get_R 17260
get_V 474
get_good_factor 426504
get_maxf 29045
get_nbprimes 29045
get_nfsqff_data 33038
get_trace 201128
guess_roots 23353
init_div_data 17076
init_proj 17041
init_trace 21700
lead_simplify 108419
lift_to_frac 26479750
max_radius 17260
nf_Beauzamy_bound 10850
nf_DDF_roots 6150
nf_L2_bound 21302
nf_LLL_cmbf 90
nf_Mignotte_bound 10850
nf_bestlift 239080
nf_bestlift_to_pol 143958
nf_chk_factors 97
nf_combine_factors 10850
nf_factor_bound 10850
nf_pick_prime 29045
nf_pol_lift 33448
nf_root_bounds 17000
nf_to_Zq 148718
nfcmbf 10850
nffactor 11670
nffactor_i 11679
nffactormod 7
nfgcd 42264
nfgcd_all 80694
nfissquarefree 43988
nfroots 39596
nfroots_if_split 21
nfrootsof1 58936
nfsqff 37608
nfsqff_trager 175
nfsqff_use_Trager 62105
normTp 23561
normlp 20846
polfnf 14
proper_nf 11085
record 116814
rnfabelianconjgen 0
rnfabelianconjgen_i 42
rnffrobeniuslift 35
rnfgaloisanalysis 35
rnfgaloisconj_bound 42
rnfisabelian 42
trivroots 50685
update_target 22113
update_trace 190510
zerofact 0

Generated by: LCOV version 1.16