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 29877-9124a6ce27) Lines: 2197 2397 91.7 %
Date: 2025-01-18 09:08:44 Functions: 155 166 93.4 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
Buchall 62378
Buchall_deg1 1176
Buchall_param 64989
FB_aut_perm 66058
FBgen 66057
Fincke_Pohst_bound 263934
Fincke_Pohst_ideal 263934
FlxqX_chinese_unit 1379
GRHchk 494752
GRHok 1528738
RgC_expbitprec 1167087
RgM_expbitprec 48580
RgV_is1 105
SPLIT 1338726
SPLIT_i 1204363
SUnits_archclean 77
Ur_ZC_mul 1322321
Vbase_to_FB 3349
ZM_remove_unused 164
ZV_divrem 1322319
ZV_mul 7283
_nfnewprec 57747
act_arch 1986827
add 2128137
addRe_modIm 6594143
add_cyclotomic_units 63881
add_principal_part 32151
add_rel 2413237
add_rel_i 2890407
add_to_fact 2831247
already_known 2886266
assign_subFB 66739
automorphism_matrices 63868
automorphism_perms 63804
bad_check 95547
bad_subFB 306275
ballvol 66058
be_honest 7
bnf_build_cheapfu 263730
bnf_build_cycgen 26726
bnf_build_matalpha 20
bnf_build_units 32055
bnf_compactfu 37198
bnf_compactfu_mat 70
bnf_get_B 2644654
bnf_get_C 2679190
bnf_get_GD 276793
bnf_get_Ur 1322321
bnf_get_W 1327294
bnf_get_ga 271837
bnf_get_vbase 1322401
bnf_has_fu 264010
bnfinit0 2611
bnfisprincipal0 1769305
bnfnewprec 7
bnfnewprec_shallow 97
bnftestprimes 63
bnrnewprec 7
bnrnewprec_shallow 0
buchall_end 64980
cache_prime_dec 918194
can_factor 17999757
chinese_unit 94
chinese_unit_slice 274
chinese_unit_worker 274
class_group_gen 63805
clean_cols 91633
cleanarch 2927845
cleanarchunit 133004
compute_R 95608
compute_invres 63804
compute_multiple_of_R 120134
compute_multiple_of_R_pivot 557822
dbg_newrel 0
delete_FB 66058
delete_cache 63881
diagact_arch 63900
divide_p 5398110
divide_p_elt 2385
divide_p_id 163573
divide_p_quo 5232154
dump_gen 1158054
err_units 0
expand 0
expandext 32172
expbitprec 2686711
extract_full_lattice 63812
fact_ok 1158603
fact_update 1970198
factorgen 16657494
fixarch 1236264
free_GRHcheck 134168
genback 28811
get_archclean 40
get_clg2 63900
get_embs 120832
get_fs 7482962
get_log_embed 721052
get_norm_fact 1161472
get_norm_fact_primes 69
get_pr_lists 1322381
get_random_ideal 54881
get_regulator 48676
get_y 69
getfu 63805
i2print 0
idealHNF_mulred 3516
idealmulpowprime2 4488
init_GRHcheck 134165
init_famat 65551
init_red_mod_units 1039952
init_rel 63881
inv_fact 0
isprincipal 174534
isprincipalall 1338681
isprincipalarch 1167081
isprincipalfact 32172
isprincipalfact_or_fail 0
isprincipalforce 0
isprincipalgen 0
isprincipalgenforce 0
log2Mbound 94
log2fubound 94
makecycgen 4956
makematal 20
makeunits 24901
matbotid 62271
matbotidembs 54102
matenlarge 54102
modIm 201929
myprecdbl 73
needed_bitprec 3831
nf_cxlog_normalize 194923
nfcyclotomicunits 63881
nfsign_from_logarch 148906
nfsign_fu 228333
nfsign_tu 227160
nfsign_units 35
not_given 389
nthideal 63805
pr_index 3349
pr_orbit_fill 11865
pre_allocate 120878
prec_arch 1340490
primeneeded 63804
reallocate 63881
recover_partFB 1322381
red_mod_units 1039953
rel_embed 1007635
rnd_rel 54881
set_fact 2241308
set_rel_alpha 938900
signunits 7
small_norm 65921
split_ideal 1322318
step 28010557
store 9118880
subFB_change 26241
subFBgen 66057
tailres 1125828
tailresback 2251659
trim_list 120877
triv_gen 462861
try_elt 1700
vec_chinese_units 94
wr_rel 0

Generated by: LCOV version 1.16