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 30318-7d854b8994) Lines: 2197 2397 91.7 %
Date: 2025-06-07 09:19:48 Functions: 155 166 93.4 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
Buchall 62381
Buchall_deg1 1204
Buchall_param 64992
FB_aut_perm 66030
FBgen 66030
Fincke_Pohst_bound 264094
Fincke_Pohst_ideal 264092
FlxqX_chinese_unit 1379
GRHchk 494434
GRHok 1528015
RgC_expbitprec 1166929
RgM_expbitprec 48558
RgV_is1 105
SPLIT 1338543
SPLIT_i 1204257
SUnits_archclean 77
Ur_ZC_mul 1322144
Vbase_to_FB 3349
ZM_remove_unused 164
ZV_divrem 1322142
ZV_mul 7283
_nfnewprec 57722
act_arch 1986359
add 2127729
addRe_modIm 6592395
add_cyclotomic_units 63854
add_principal_part 32152
add_rel 2412382
add_rel_i 2889079
add_to_fact 2830700
already_known 2884940
assign_subFB 66773
automorphism_matrices 63838
automorphism_perms 63777
bad_check 95779
bad_subFB 306395
ballvol 66031
be_honest 7
bnf_build_cheapfu 263973
bnf_build_cycgen 26726
bnf_build_matalpha 20
bnf_build_units 32055
bnf_compactfu 37191
bnf_compactfu_mat 70
bnf_get_B 2644304
bnf_get_C 2678824
bnf_get_GD 276751
bnf_get_Ur 1322144
bnf_get_W 1327117
bnf_get_ga 271795
bnf_get_vbase 1322224
bnf_has_fu 264254
bnfinit0 2611
bnfisprincipal0 1770850
bnfnewprec 7
bnfnewprec_shallow 97
bnftestprimes 63
bnrnewprec 7
bnrnewprec_shallow 0
buchall_end 64979
cache_prime_dec 917653
can_factor 17995032
chinese_unit 94
chinese_unit_slice 274
chinese_unit_worker 274
class_group_gen 63777
clean_cols 91678
cleanarch 2927202
cleanarchunit 132957
compute_R 95841
compute_invres 63776
compute_multiple_of_R 120361
compute_multiple_of_R_pivot 559007
dbg_newrel 0
delete_FB 66030
delete_cache 63854
diagact_arch 63873
divide_p 5396810
divide_p_elt 2421
divide_p_id 163506
divide_p_quo 5230886
dump_gen 1157901
err_units 0
expand 0
expandext 32172
expbitprec 2686085
extract_full_lattice 63784
fact_ok 1158450
fact_update 1968857
factorgen 16652852
fixarch 1236089
free_GRHcheck 134098
genback 28769
get_archclean 40
get_clg2 63873
get_embs 121041
get_fs 7477735
get_log_embed 720928
get_norm_fact 1161316
get_norm_fact_primes 69
get_pr_lists 1322206
get_random_ideal 55164
get_regulator 48655
get_y 69
getfu 63777
i2print 0
idealHNF_mulred 3515
idealmulpowprime2 4488
init_GRHcheck 134097
init_famat 65524
init_red_mod_units 1039783
init_rel 63854
inv_fact 0
isprincipal 174513
isprincipalall 1338504
isprincipalarch 1166929
isprincipalfact 32173
isprincipalfact_or_fail 0
isprincipalforce 0
isprincipalgen 0
isprincipalgenforce 0
log2Mbound 94
log2fubound 94
makecycgen 4956
makematal 20
makeunits 24901
matbotid 62264
matbotidembs 54358
matenlarge 54358
modIm 201889
myprecdbl 73
needed_bitprec 3831
nf_cxlog_normalize 194924
nfcyclotomicunits 63854
nfsign_from_logarch 148925
nfsign_fu 228582
nfsign_tu 227412
nfsign_units 35
not_given 389
nthideal 63777
pr_index 3349
pr_orbit_fill 11865
pre_allocate 121080
prec_arch 1340300
primeneeded 63776
reallocate 63854
recover_partFB 1322206
red_mod_units 1039783
rel_embed 1007394
rnd_rel 55164
set_fact 2240570
set_rel_alpha 938842
signunits 7
small_norm 65839
split_ideal 1322141
step 27998073
store 9116366
subFB_change 26419
subFBgen 66031
tailres 1125265
tailresback 2250528
trim_list 121080
triv_gen 464583
try_elt 1719
vec_chinese_units 94
wr_rel 0

Generated by: LCOV version 1.16