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 29892-c9d59c3d7f) Lines: 2197 2397 91.7 %
Date: 2025-01-25 09:09:36 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 1662
divide_p_elt 2346
bnfinit0 2611
Vbase_to_FB 3349
pr_index 3349
idealHNF_mulred 3515
needed_bitprec 3831
idealmulpowprime2 4488
makecycgen 4956
ZV_mul 7283
pr_orbit_fill 11865
makeunits 24901
subFB_change 26225
bnf_build_cycgen 26726
genback 28811
bnf_build_units 32054
add_principal_part 32152
expandext 32173
isprincipalfact 32173
bnf_compactfu 37198
RgM_expbitprec 48580
get_regulator 48677
matbotidembs 54060
matenlarge 54060
get_random_ideal 54845
rnd_rel 54845
_nfnewprec 57749
matbotid 62269
Buchall 62381
automorphism_perms 63803
primeneeded 63804
class_group_gen 63805
compute_invres 63805
getfu 63805
nthideal 63805
extract_full_lattice 63811
automorphism_matrices 63867
add_cyclotomic_units 63879
delete_cache 63879
init_rel 63879
nfcyclotomicunits 63879
reallocate 63879
diagact_arch 63902
get_clg2 63902
buchall_end 64981
Buchall_param 64991
init_famat 65552
small_norm 65913
FBgen 66054
ballvol 66055
subFBgen 66055
FB_aut_perm 66056
delete_FB 66056
assign_subFB 66715
clean_cols 91630
bad_check 95510
compute_R 95572
compute_multiple_of_R 120097
get_embs 120788
pre_allocate 120833
trim_list 120833
cleanarchunit 133006
init_GRHcheck 134163
free_GRHcheck 134167
nfsign_from_logarch 148900
divide_p_id 163571
isprincipal 174534
nf_cxlog_normalize 194923
modIm 201923
nfsign_tu 227169
nfsign_fu 228334
bnf_build_cheapfu 263737
Fincke_Pohst_bound 263880
Fincke_Pohst_ideal 263889
bnf_has_fu 264017
bnf_get_ga 271836
bnf_get_GD 276792
bad_subFB 306231
triv_gen 462861
GRHchk 494754
compute_multiple_of_R_pivot 557840
get_log_embed 720968
cache_prime_dec 918185
set_rel_alpha 938810
rel_embed 1007502
red_mod_units 1039952
init_red_mod_units 1039953
tailres 1125828
dump_gen 1158051
fact_ok 1158605
get_norm_fact 1161471
isprincipalarch 1167083
RgC_expbitprec 1167084
SPLIT_i 1204360
fixarch 1236265
split_ideal 1322318
bnf_get_Ur 1322319
Ur_ZC_mul 1322320
ZV_divrem 1322320
get_pr_lists 1322382
recover_partFB 1322382
bnf_get_vbase 1322401
bnf_get_W 1327294
isprincipalall 1338681
SPLIT 1338727
prec_arch 1340488
GRHok 1528710
bnfisprincipal0 1769304
fact_update 1970058
act_arch 1986816
add 2128128
set_fact 2241107
tailresback 2251650
add_rel 2413007
bnf_get_B 2644653
bnf_get_C 2679189
expbitprec 2686706
add_to_fact 2831073
already_known 2885990
add_rel_i 2890123
cleanarch 2927853
divide_p_quo 5231916
divide_p 5397826
addRe_modIm 6594136
get_fs 7483493
store 9118396
factorgen 16657228
can_factor 17999505
step 28008720

Generated by: LCOV version 1.16