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 - buch2.c (source / functions) Hit Total Coverage
Test: PARI/GP v2.18.1 lcov report (development 30556-bb9f5f8fc8) Lines: 2215 2530 87.5 %
Date: 2025-11-25 09:20:50 Functions: 159 176 90.3 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
Buchall 61562
Buchall_deg1 1162
Buchall_param 64195
FB_aut_perm 65199
FBgen 65197
Fincke_Pohst_bound 262299
Fincke_Pohst_ideal 262304
Fincke_Pohst_ideal_both 262304
Fincke_Pohst_ideal_par 0
FlxqX_chinese_unit 1379
GRHchk 489899
GRHok 1526404
RgC_expbitprec 1235144
RgM_expbitprec 48272
RgV_is1 105
SPLIT 1406779
SPLIT_i 1250897
SUnits_archclean 77
Ur_ZC_mul 1390374
Vbase_to_FB 3349
ZM_remove_unused 164
ZV_divrem 1390374
ZV_mul 7283
_nfnewprec 56742
act_arch 2047739
add 2242882
addRe_modIm 6890576
add_cyclotomic_units 63106
add_principal_part 32173
add_rel 2404547
add_rel_i 2880178
add_to_fact 2825616
already_known 2876192
assign_subFB 65904
automorphism_matrices 63098
automorphism_perms 63035
bad_check 94106
bad_subFB 301990
ballvol 65196
be_honest 7
bnf_build_cheapfu 284285
bnf_build_cycgen 26698
bnf_build_matalpha 20
bnf_build_units 50738
bnf_compactfu 37330
bnf_compactfu_mat 70
bnf_get_B 2780763
bnf_get_C 2815293
bnf_get_GD 275061
bnf_get_Ur 1390374
bnf_get_W 1395317
bnf_get_ga 270133
bnf_get_vbase 1390453
bnf_has_fu 284572
bnfinit0 2632
bnfinit_FP_worker 0
bnfisprincipal0 1839060
bnfnewprec 7
bnfnewprec_shallow 97
bnftestprimes 63
bnrnewprec 7
bnrnewprec_shallow 0
buchall_end 64197
cache_prime_dec 908397
can_factor 18192424
chinese_unit 94
chinese_unit_slice 274
chinese_unit_worker 274
class_group_gen 63034
clean_cols 91665
cleanarch 3062780
cleanarchunit 132170
compute_R 94169
compute_invres 63035
compute_multiple_of_R 119446
compute_multiple_of_R_pivot 566036
dbg_newrel 0
delete_FB 65198
delete_cache 63106
diagact_arch 63132
divide_p 5460410
divide_p_elt 2341
divide_p_id 185076
divide_p_quo 5272999
dump_gen 1226128
err_units 0
expand 0
expandext 32194
expbitprec 2835322
extract_full_lattice 63042
fact_ok 1226649
fact_update 1975105
factorgen 16782153
fixarch 1304265
free_GRHcheck 133700
genback 28343
get_archclean 40
get_clg2 63132
get_embs 120102
get_fs 7419008
get_log_embed 718726
get_norm_fact 1229565
get_norm_fact_primes 69
get_pr_lists 1390433
get_random_ideal 53515
get_regulator 48369
get_y 69
getfu 63033
i2print 0
idealHNF_mulred 3500
idealmulpowprime2 4488
init_GRHcheck 133699
init_famat 64783
init_red_mod_units 1107554
init_rel 63106
inv_fact 0
isprincipal 174513
isprincipalall 1406754
isprincipalarch 1235149
isprincipalfact 32194
isprincipalfact_or_fail 0
isprincipalforce 0
isprincipalgen 0
isprincipalgenforce 0
log2Mbound 94
log2fubound 94
makecycgen 4928
makematal 20
makeunits 24915
matbotid 61503
matbotidembs 54160
matenlarge 54160
modIm 202278
myprecdbl 73
needed_bitprec 3849
nf_cxlog_normalize 197126
nfcyclotomicunits 63106
nfsign_from_logarch 162273
nfsign_fu 240028
nfsign_tu 238881
nfsign_units 35
not_given 396
nthideal 63035
pack_FB 0
pr_index 3349
pr_orbit_fill 11865
pre_allocate 120142
prec_arch 1408521
primeneeded 63035
reallocate 63106
recover_partFB 1390433
red_mod_units 1107554
rel_embed 1003485
rnd_rel 53515
rnd_rel_par 0
rnd_rel_seq 53515
set_fact 2234320
set_rel_alpha 935011
signunits 7
small_norm 66556
small_norm_par 0
small_norm_prec 63035
small_norm_seq 66556
split_ideal 1390370
step 28102912
store 9177727
subFB_change 25194
subFBgen 65197
tailres 1112511
tailresback 2225021
trim_list 120142
triv_gen 464562
try_elt 1610
unpack_FB 0
vec_chinese_units 94
wr_rel 0

Generated by: LCOV version 1.16