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
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 175
get_V 476
ZXirred_is_cyclo_translate 2556
QXQX_gcd 3003
ZXQX_gcd 5264
nf_DDF_roots 5691
nf_Beauzamy_bound 7664
nf_Mignotte_bound 7664
nf_combine_factors 7664
nf_factor_bound 7664
nfcmbf 7664
get_Bhigh 7755
proper_nf 7918
fact_from_sqff 8161
nffactor 8483
nffactor_i 8490
nf_root_bounds 13355
ZqX_normalize 13362
ZqX 13397
bestlift_bound 13397
bestlift_init 13397
init_proj 13397
init_div_data 13432
get_R 13615
max_radius 13615
init_trace 15328
nfgcd 17414
nf_L2_bound 17617
guess_roots 17662
nfissquarefree 19060
normTp 19459
update_target 19581
normlp 20586
get_maxf 23019
get_nbprimes 23019
nf_pick_prime 23019
fix_nf 26813
get_nfsqff_data 26967
ensure_lt_INT 26981
RgX_int_normalize 27406
QXQX_normalize 28304
nf_pol_lift 30130
nfsqff 31555
nfroots 36712
FqX_centermod 46042
trivroots 47997
nfgcd_all 49778
nfsqff_use_Trager 50007
nfrootsof1 52797
lead_simplify 65262
cmbf_maxK 87409
record 97411
nf_to_Zq 130068
nf_bestlift_to_pol 133145
arch_for_T2 156982
update_trace 194392
get_trace 199894
nf_bestlift 216543
FpX_ratlift 339538
get_good_factor 362797
_norml2 421938
FpM_ratlift 2590586
FpC_ratlift 4993380
lift_to_frac 25882013

Generated by: LCOV version 1.16