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

Generated by: LCOV version 1.16