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 30007-407ab607e8) Lines: 1223 1314 93.1 %
Date: 2025-02-20 09:19:49 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
fixedalg_order 0
rnfabelianconjgen 0
zerofact 0
nffactormod 7
polfnf 14
nfroots_if_split 21
rnffrobeniuslift 35
rnfgaloisanalysis 35
rnfabelianconjgen_i 42
rnfgaloisconj_bound 42
rnfisabelian 42
RgX_galconj_bound 63
nf_LLL_cmbf 91
nf_chk_factors 98
nfsqff_trager 168
get_V 476
ZXirred_is_cyclo_translate 2933
QXQX_gcd 3150
ZXQX_gcd 5439
nf_DDF_roots 6256
nf_Mignotte_bound 12214
nf_factor_bound 12214
nf_Beauzamy_bound 12215
nf_combine_factors 12215
nfcmbf 12215
get_Bhigh 12306
proper_nf 12411
fact_from_sqff 12656
nffactor 12971
nffactor_i 12978
nf_root_bounds 18471
ZqX_normalize 18478
ZqX 18513
bestlift_bound 18513
bestlift_init 18513
init_proj 18513
init_div_data 18548
get_R 18745
max_radius 18745
normlp 20866
nf_L2_bound 22534
init_trace 24430
update_target 24605
guess_roots 25053
normTp 25140
get_maxf 27638
get_nbprimes 27639
nf_pick_prime 27639
fix_nf 30866
get_nfsqff_data 31013
ensure_lt_INT 31027
QXQX_normalize 32287
nfsqff 34968
nfroots 36151
nf_pol_lift 36782
RgX_int_normalize 36981
nfgcd 47630
nfissquarefree 49420
FqX_centermod 53106
trivroots 55370
nfsqff_use_Trager 58673
nfrootsof1 64526
nfgcd_all 84214
cmbf_maxK 111300
lead_simplify 114502
record 123420
nf_bestlift_to_pol 157153
nf_to_Zq 161841
arch_for_T2 203351
get_trace 205965
update_trace 209242
nf_bestlift 262526
FpX_ratlift 362098
get_good_factor 429651
_norml2 478456
FpM_ratlift 2741627
FpC_ratlift 5297387
lift_to_frac 27159922

Generated by: LCOV version 1.16