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 30622-caa25a75db) Lines: 2218 2538 87.4 %
Date: 2026-01-22 09:18:00 Functions: 159 176 90.3 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
Buchall 56802
Buchall_deg1 1196
Buchall_param 59444
FB_aut_perm 60330
FBgen 60328
Fincke_Pohst_bound 247810
Fincke_Pohst_ideal 247809
Fincke_Pohst_ideal_both 247809
Fincke_Pohst_ideal_par 0
FlxqX_chinese_unit 1364
GRHchk 452546
GRHok 1487025
RgC_expbitprec 1224371
RgM_expbitprec 43623
RgV_is1 105
SPLIT 1396219
SPLIT_i 1245702
SUnits_archclean 77
Ur_ZC_mul 1379811
Vbase_to_FB 3421
ZM_remove_unused 163
ZV_divrem 1379811
ZV_mul 7289
_nfnewprec 52420
act_arch 2019197
add 2224705
addRe_modIm 6795647
add_cyclotomic_units 58307
add_principal_part 31278
add_rel 2385889
add_rel_i 2841453
add_to_fact 2826080
already_known 2837735
assign_subFB 61080
automorphism_matrices 58291
automorphism_perms 58229
bad_check 88588
bad_subFB 281870
ballvol 60330
be_honest 7
bnf_build_cheapfu 255315
bnf_build_cycgen 24974
bnf_build_matalpha 20
bnf_build_units 47723
bnf_compactfu 32592
bnf_compactfu_mat 70
bnf_get_B 2759642
bnf_get_C 2792355
bnf_get_GD 274860
bnf_get_Ur 1379811
bnf_get_W 1384569
bnf_get_ga 270122
bnf_get_vbase 1379894
bnf_has_fu 255601
bnfinit0 2641
bnfinit_FP_worker 0
bnfisprincipal0 1827542
bnfnewprec 7
bnfnewprec_shallow 97
bnftestprimes 63
bnrnewprec 7
bnrnewprec_shallow 0
buchall_end 59425
cache_prime_dec 838631
can_factor 18524851
chinese_unit 93
chinese_unit_slice 271
chinese_unit_worker 271
class_group_gen 58229
clean_cols 84375
cleanarch 3014907
cleanarchunit 121324
compute_R 88653
compute_invres 58229
compute_multiple_of_R 111946
compute_multiple_of_R_pivot 541820
dbg_newrel 0
delete_FB 60330
delete_cache 58307
diagact_arch 58326
divide_p 5509259
divide_p_elt 2477
divide_p_id 179808
divide_p_quo 5326975
dump_gen 1215562
err_units 0
expand 0
expandext 31300
expbitprec 2804077
extract_full_lattice 58235
fact_ok 1215859
fact_update 2087076
factorgen 17124867
fixarch 1287454
free_GRHcheck 128662
genback 27186
get_archclean 40
get_clg2 58326
get_embs 112593
get_fs 6872359
get_log_embed 664828
get_norm_fact 1218970
get_norm_fact_primes 69
get_pr_lists 1379874
get_random_ideal 53486
get_regulator 43719
get_y 69
getfu 58229
i2print 0
idealHNF_mulred 3492
idealmulpowprime2 4762
init_GRHcheck 128655
init_famat 60030
init_red_mod_units 1103177
init_rel 58307
inv_fact 0
isprincipal 174122
isprincipalall 1395293
isprincipalarch 1224371
isprincipalfact 31300
isprincipalfact_or_fail 0
isprincipalforce 0
isprincipalgen 0
isprincipalgenforce 0
log2Mbound 93
log2fubound 93
makecycgen 4738
makematal 20
makeunits 21899
matbotid 56716
matbotidembs 51333
matenlarge 51333
modIm 186970
myprecdbl 73
needed_bitprec 3817
nf_cxlog_normalize 196897
nfcyclotomicunits 58307
nfsign_from_logarch 145856
nfsign_fu 215798
nfsign_tu 214618
nfsign_units 35
not_given 392
nthideal 58228
pack_FB 0
pr_index 3421
pr_orbit_fill 11865
pre_allocate 113483
prec_arch 1397042
primeneeded 58229
reallocate 58307
recover_partFB 1379874
red_mod_units 1103177
rel_embed 938599
rnd_rel 53486
rnd_rel_par 0
rnd_rel_seq 53486
set_fact 2226297
set_rel_alpha 870684
signunits 7
small_norm 59920
small_norm_par 0
small_norm_prec 58230
small_norm_seq 59920
split_ideal 1379811
step 28655510
store 9223718
subFB_change 25015
subFBgen 60330
tailres 1028112
tailresback 2056216
trim_list 113483
triv_gen 463611
try_elt 1756
unpack_FB 0
vec_chinese_units 93
wr_rel 0

Generated by: LCOV version 1.16