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 29950-285c5b69ed) Lines: 2197 2397 91.7 %
Date: 2025-02-05 09:09:51 Functions: 155 166 93.4 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
Buchall 62376
Buchall_deg1 1176
Buchall_param 64988
FB_aut_perm 66058
FBgen 66057
Fincke_Pohst_bound 263956
Fincke_Pohst_ideal 263953
FlxqX_chinese_unit 1379
GRHchk 494754
GRHok 1528721
RgC_expbitprec 1167082
RgM_expbitprec 48579
RgV_is1 105
SPLIT 1338721
SPLIT_i 1204362
SUnits_archclean 77
Ur_ZC_mul 1322321
Vbase_to_FB 3349
ZM_remove_unused 164
ZV_divrem 1322319
ZV_mul 7283
_nfnewprec 57746
act_arch 1986826
add 2128139
addRe_modIm 6594134
add_cyclotomic_units 63881
add_principal_part 32152
add_rel 2413197
add_rel_i 2890398
add_to_fact 2831219
already_known 2886247
assign_subFB 66731
automorphism_matrices 63867
automorphism_perms 63805
bad_check 95561
bad_subFB 306295
ballvol 66058
be_honest 7
bnf_build_cheapfu 263728
bnf_build_cycgen 26726
bnf_build_matalpha 20
bnf_build_units 32055
bnf_compactfu 37197
bnf_compactfu_mat 70
bnf_get_B 2644655
bnf_get_C 2679188
bnf_get_GD 276793
bnf_get_Ur 1322321
bnf_get_W 1327292
bnf_get_ga 271837
bnf_get_vbase 1322399
bnf_has_fu 264008
bnfinit0 2611
bnfisprincipal0 1769305
bnfnewprec 7
bnfnewprec_shallow 97
bnftestprimes 63
bnrnewprec 7
bnrnewprec_shallow 0
buchall_end 64981
cache_prime_dec 918207
can_factor 17999993
chinese_unit 94
chinese_unit_slice 273
chinese_unit_worker 273
class_group_gen 63803
clean_cols 91658
cleanarch 2927862
cleanarchunit 133005
compute_R 95628
compute_invres 63805
compute_multiple_of_R 120155
compute_multiple_of_R_pivot 557927
dbg_newrel 0
delete_FB 66058
delete_cache 63881
diagact_arch 63901
divide_p 5398005
divide_p_elt 2386
divide_p_id 163573
divide_p_quo 5232052
dump_gen 1158057
err_units 0
expand 0
expandext 32173
expbitprec 2686703
extract_full_lattice 63811
fact_ok 1158605
fact_update 1970092
factorgen 16657708
fixarch 1236266
free_GRHcheck 134167
genback 28811
get_archclean 40
get_clg2 63901
get_embs 120854
get_fs 7483641
get_log_embed 721069
get_norm_fact 1161473
get_norm_fact_primes 69
get_pr_lists 1322379
get_random_ideal 54899
get_regulator 48677
get_y 69
getfu 63804
i2print 0
idealHNF_mulred 3520
idealmulpowprime2 4488
init_GRHcheck 134166
init_famat 65553
init_red_mod_units 1039953
init_rel 63881
inv_fact 0
isprincipal 174534
isprincipalall 1338681
isprincipalarch 1167086
isprincipalfact 32173
isprincipalfact_or_fail 0
isprincipalforce 0
isprincipalgen 0
isprincipalgenforce 0
log2Mbound 94
log2fubound 94
makecycgen 4956
makematal 20
makeunits 24901
matbotid 62271
matbotidembs 54122
matenlarge 54122
modIm 201936
myprecdbl 73
needed_bitprec 3831
nf_cxlog_normalize 194923
nfcyclotomicunits 63881
nfsign_from_logarch 148907
nfsign_fu 228329
nfsign_tu 227158
nfsign_units 35
not_given 389
nthideal 63805
pr_index 3349
pr_orbit_fill 11865
pre_allocate 120899
prec_arch 1340490
primeneeded 63803
reallocate 63881
recover_partFB 1322379
red_mod_units 1039953
rel_embed 1007661
rnd_rel 54899
set_fact 2241273
set_rel_alpha 938940
signunits 7
small_norm 65924
split_ideal 1322316
step 28009279
store 9118751
subFB_change 26238
subFBgen 66058
tailres 1125829
tailresback 2251652
trim_list 120899
triv_gen 462861
try_elt 1699
vec_chinese_units 94
wr_rel 0

Generated by: LCOV version 1.16