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

Generated by: LCOV version 1.16