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 30640-c2c58e18c5) Lines: 1223 1314 93.1 %
Date: 2026-01-27 08:51:18 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 4993380
FpM_ratlift 2590586
FpX_ratlift 339538
FqX_centermod 46042
QXQX_gcd 3003
QXQX_normalize 28304
RgX_galconj_bound 63
RgX_int_normalize 27406
ZXQX_gcd 5264
ZXirred_is_cyclo_translate 2556
ZqX 13397
ZqX_normalize 13362
_norml2 421938
arch_for_T2 156982
bestlift_bound 13397
bestlift_init 13397
cmbf_maxK 87409
ensure_lt_INT 26981
fact_from_sqff 8161
fix_nf 26813
fixedalg_order 0
get_Bhigh 7755
get_R 13615
get_V 476
get_good_factor 362797
get_maxf 23019
get_nbprimes 23019
get_nfsqff_data 26967
get_trace 199894
guess_roots 17662
init_div_data 13432
init_proj 13397
init_trace 15328
lead_simplify 65262
lift_to_frac 25882013
max_radius 13615
nf_Beauzamy_bound 7664
nf_DDF_roots 5691
nf_L2_bound 17617
nf_LLL_cmbf 91
nf_Mignotte_bound 7664
nf_bestlift 216543
nf_bestlift_to_pol 133145
nf_chk_factors 98
nf_combine_factors 7664
nf_factor_bound 7664
nf_pick_prime 23019
nf_pol_lift 30130
nf_root_bounds 13355
nf_to_Zq 130068
nfcmbf 7664
nffactor 8483
nffactor_i 8490
nffactormod 7
nfgcd 17414
nfgcd_all 49778
nfissquarefree 19060
nfroots 36712
nfroots_if_split 21
nfrootsof1 52797
nfsqff 31555
nfsqff_trager 175
nfsqff_use_Trager 50007
normTp 19459
normlp 20586
polfnf 14
proper_nf 7918
record 97411
rnfabelianconjgen 0
rnfabelianconjgen_i 42
rnffrobeniuslift 35
rnfgaloisanalysis 35
rnfgaloisconj_bound 42
rnfisabelian 42
trivroots 47997
update_target 19581
update_trace 194392
zerofact 0

Generated by: LCOV version 1.16