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 30640-c2c58e18c5) Lines: 2218 2538 87.4 %
Date: 2026-01-27 08:51:18 Functions: 159 176 90.3 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
Buchall 50602
Buchall_deg1 1144
Buchall_param 53243
FB_aut_perm 53762
FBgen 53761
Fincke_Pohst_bound 220333
Fincke_Pohst_ideal 220335
Fincke_Pohst_ideal_both 220335
Fincke_Pohst_ideal_par 0
FlxqX_chinese_unit 1379
GRHchk 410075
GRHok 1444512
RgC_expbitprec 1169179
RgM_expbitprec 39317
RgV_is1 105
SPLIT 1341779
SPLIT_i 1212431
SUnits_archclean 77
Ur_ZC_mul 1325371
Vbase_to_FB 3426
ZM_remove_unused 164
ZV_divrem 1325371
ZV_mul 7332
_nfnewprec 46764
act_arch 1927773
add 2131046
addRe_modIm 6625081
add_cyclotomic_units 52143
add_principal_part 31873
add_rel 2220020
add_rel_i 2600148
add_to_fact 2661973
already_known 2597383
assign_subFB 54342
automorphism_matrices 52152
automorphism_perms 52090
bad_check 75630
bad_subFB 249870
ballvol 53762
be_honest 7
bnf_build_cheapfu 121831
bnf_build_cycgen 16443
bnf_build_matalpha 20
bnf_build_units 50745
bnf_compactfu 10819
bnf_compactfu_mat 70
bnf_get_B 2650761
bnf_get_C 2684248
bnf_get_GD 268200
bnf_get_Ur 1325371
bnf_get_W 1329226
bnf_get_ga 264365
bnf_get_vbase 1325454
bnf_has_fu 122118
bnfinit0 2639
bnfinit_FP_worker 0
bnfisprincipal0 1768438
bnfnewprec 7
bnfnewprec_shallow 97
bnftestprimes 63
bnrnewprec 7
bnrnewprec_shallow 0
buchall_end 53230
cache_prime_dec 748246
can_factor 18311671
chinese_unit 94
chinese_unit_slice 274
chinese_unit_worker 274
class_group_gen 52086
clean_cols 67351
cleanarch 2907215
cleanarchunit 109595
compute_R 75692
compute_invres 52090
compute_multiple_of_R 91490
compute_multiple_of_R_pivot 467470
dbg_newrel 0
delete_FB 53758
delete_cache 52139
diagact_arch 52182
divide_p 5361134
divide_p_elt 1915
divide_p_id 158434
divide_p_quo 5200793
dump_gen 1161172
err_units 0
expand 0
expandext 31894
expbitprec 2716464
extract_full_lattice 52092
fact_ok 1160624
fact_update 2026441
factorgen 16966488
fixarch 1226673
free_GRHcheck 122519
genback 24832
get_archclean 40
get_clg2 52182
get_embs 92041
get_fs 6356941
get_log_embed 618147
get_norm_fact 1164615
get_norm_fact_primes 69
get_pr_lists 1325434
get_random_ideal 43249
get_regulator 39414
get_y 69
getfu 52085
i2print 0
idealHNF_mulred 3466
idealmulpowprime2 4761
init_GRHcheck 122520
init_famat 53889
init_red_mod_units 1087860
init_rel 52143
inv_fact 0
isprincipal 174467
isprincipalall 1341307
isprincipalarch 1169179
isprincipalfact 31894
isprincipalfact_or_fail 0
isprincipalforce 0
isprincipalgen 0
isprincipalgenforce 0
log2Mbound 94
log2fubound 94
makecycgen 3835
makematal 20
makeunits 24922
matbotid 50547
matbotidembs 36936
matenlarge 36936
modIm 171596
myprecdbl 73
needed_bitprec 3857
nf_cxlog_normalize 197126
nfcyclotomicunits 52143
nfsign_from_logarch 88343
nfsign_fu 104059
nfsign_tu 102886
nfsign_units 35
not_given 396
nthideal 52090
pack_FB 0
pr_index 3426
pr_orbit_fill 11865
pre_allocate 92931
prec_arch 1342921
primeneeded 52090
reallocate 52143
recover_partFB 1325434
red_mod_units 1087860
rel_embed 841284
rnd_rel 43249
rnd_rel_par 0
rnd_rel_seq 43249
set_fact 2075745
set_rel_alpha 773464
signunits 7
small_norm 49630
small_norm_par 0
small_norm_prec 52088
small_norm_seq 49630
split_ideal 1325371
step 28336074
store 8913270
subFB_change 20139
subFBgen 53762
tailres 921160
tailresback 1842313
trim_list 92931
triv_gen 459087
try_elt 1331
unpack_FB 0
vec_chinese_units 94
wr_rel 0

Generated by: LCOV version 1.16