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 29873-a0b27995a4) Lines: 2197 2397 91.7 %
Date: 2025-01-14 09:09:31 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 1682
divide_p_elt 2363
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 26227
bnf_build_cycgen 26726
genback 28812
bnf_build_units 32055
add_principal_part 32150
isprincipalfact 32172
expandext 32173
bnf_compactfu 37198
RgM_expbitprec 48580
get_regulator 48675
matbotidembs 54070
matenlarge 54070
rnd_rel 54844
get_random_ideal 54845
_nfnewprec 57744
matbotid 62270
Buchall 62379
automorphism_perms 63805
class_group_gen 63805
compute_invres 63805
getfu 63805
nthideal 63805
primeneeded 63805
extract_full_lattice 63812
automorphism_matrices 63866
add_cyclotomic_units 63880
delete_cache 63880
init_rel 63880
nfcyclotomicunits 63880
reallocate 63880
diagact_arch 63902
get_clg2 63902
buchall_end 64981
Buchall_param 64990
init_famat 65553
small_norm 65924
ballvol 66056
subFBgen 66056
FB_aut_perm 66057
FBgen 66057
delete_FB 66057
assign_subFB 66719
clean_cols 91600
bad_check 95525
compute_R 95586
compute_multiple_of_R 120107
get_embs 120800
pre_allocate 120845
trim_list 120845
cleanarchunit 133007
free_GRHcheck 134168
init_GRHcheck 134168
nfsign_from_logarch 148904
divide_p_id 163572
isprincipal 174534
nf_cxlog_normalize 194923
modIm 201930
nfsign_tu 227167
nfsign_fu 228331
bnf_build_cheapfu 263728
Fincke_Pohst_bound 263897
Fincke_Pohst_ideal 263903
bnf_has_fu 264008
bnf_get_ga 271837
bnf_get_GD 276792
bad_subFB 306259
triv_gen 462861
GRHchk 494753
compute_multiple_of_R_pivot 557800
get_log_embed 721000
cache_prime_dec 918201
set_rel_alpha 938823
rel_embed 1007556
init_red_mod_units 1039953
red_mod_units 1039953
tailres 1125819
dump_gen 1158056
fact_ok 1158603
get_norm_fact 1161470
isprincipalarch 1167084
RgC_expbitprec 1167085
SPLIT_i 1204359
fixarch 1236259
split_ideal 1322316
Ur_ZC_mul 1322318
bnf_get_Ur 1322318
ZV_divrem 1322321
get_pr_lists 1322380
recover_partFB 1322380
bnf_get_vbase 1322399
bnf_get_W 1327292
isprincipalall 1338681
SPLIT 1338723
prec_arch 1340486
GRHok 1528733
bnfisprincipal0 1769305
fact_update 1970044
act_arch 1986821
add 2128134
set_fact 2241249
tailresback 2251644
add_rel 2413186
bnf_get_B 2644652
bnf_get_C 2679187
expbitprec 2686709
add_to_fact 2831247
already_known 2886226
add_rel_i 2890370
cleanarch 2927863
divide_p_quo 5232081
divide_p 5398015
addRe_modIm 6594145
get_fs 7482559
store 9118749
factorgen 16657135
can_factor 17999401
step 28009312

Generated by: LCOV version 1.16