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 30076-15f6073f4c) Lines: 2197 2397 91.7 %
Date: 2025-03-15 09:20:18 Functions: 155 166 93.4 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
Buchall 62408
Buchall_deg1 1190
Buchall_param 65021
FB_aut_perm 66067
FBgen 66066
Fincke_Pohst_bound 264199
Fincke_Pohst_ideal 264203
FlxqX_chinese_unit 1379
GRHchk 494840
GRHok 1528776
RgC_expbitprec 1166969
RgM_expbitprec 48579
RgV_is1 105
SPLIT 1338611
SPLIT_i 1204259
SUnits_archclean 77
Ur_ZC_mul 1322206
Vbase_to_FB 3349
ZM_remove_unused 164
ZV_divrem 1322207
ZV_mul 7283
_nfnewprec 57740
act_arch 1986743
add 2128006
addRe_modIm 6593143
add_cyclotomic_units 63892
add_principal_part 32152
add_rel 2413621
add_rel_i 2891012
add_to_fact 2831954
already_known 2886870
assign_subFB 66804
automorphism_matrices 63880
automorphism_perms 63819
bad_check 95788
bad_subFB 306460
ballvol 66068
be_honest 7
bnf_build_cheapfu 263764
bnf_build_cycgen 26726
bnf_build_matalpha 20
bnf_build_units 32055
bnf_compactfu 37212
bnf_compactfu_mat 70
bnf_get_B 2644426
bnf_get_C 2678949
bnf_get_GD 276793
bnf_get_Ur 1322206
bnf_get_W 1327177
bnf_get_ga 271837
bnf_get_vbase 1322284
bnf_has_fu 264043
bnfinit0 2611
bnfisprincipal0 1769220
bnfnewprec 7
bnfnewprec_shallow 97
bnftestprimes 63
bnrnewprec 7
bnrnewprec_shallow 0
buchall_end 65009
cache_prime_dec 918378
can_factor 18000053
chinese_unit 94
chinese_unit_slice 274
chinese_unit_worker 274
class_group_gen 63819
clean_cols 91717
cleanarch 2927642
cleanarchunit 133019
compute_R 95850
compute_invres 63819
compute_multiple_of_R 120403
compute_multiple_of_R_pivot 559472
dbg_newrel 0
delete_FB 66069
delete_cache 63892
diagact_arch 63915
divide_p 5398686
divide_p_elt 2348
divide_p_id 163569
divide_p_quo 5232770
dump_gen 1157939
err_units 0
expand 0
expandext 32173
expbitprec 2686208
extract_full_lattice 63826
fact_ok 1158489
fact_update 1970528
factorgen 16657946
fixarch 1236149
free_GRHcheck 134181
genback 28812
get_archclean 40
get_clg2 63915
get_embs 121083
get_fs 7484010
get_log_embed 721242
get_norm_fact 1161357
get_norm_fact_primes 69
get_pr_lists 1322264
get_random_ideal 55134
get_regulator 48677
get_y 69
getfu 63816
i2print 0
idealHNF_mulred 3516
idealmulpowprime2 4488
init_GRHcheck 134180
init_famat 65567
init_red_mod_units 1039824
init_rel 63892
inv_fact 0
isprincipal 174534
isprincipalall 1338567
isprincipalarch 1166967
isprincipalfact 32173
isprincipalfact_or_fail 0
isprincipalforce 0
isprincipalgen 0
isprincipalgenforce 0
log2Mbound 94
log2fubound 94
makecycgen 4956
makematal 20
makeunits 24901
matbotid 62282
matbotidembs 54339
matenlarge 54339
modIm 201920
myprecdbl 73
needed_bitprec 3831
nf_cxlog_normalize 194924
nfcyclotomicunits 63892
nfsign_from_logarch 148926
nfsign_fu 228359
nfsign_tu 227184
nfsign_units 35
not_given 389
nthideal 63819
pr_index 3349
pr_orbit_fill 11865
pre_allocate 121123
prec_arch 1340363
primeneeded 63819
reallocate 63892
recover_partFB 1322264
red_mod_units 1039823
rel_embed 1008052
rnd_rel 55134
set_fact 2241687
set_rel_alpha 939399
signunits 7
small_norm 65916
split_ideal 1322201
step 28007455
store 9120028
subFB_change 26382
subFBgen 66069
tailres 1126065
tailresback 2252130
trim_list 121123
triv_gen 462889
try_elt 1649
vec_chinese_units 94
wr_rel 0

Generated by: LCOV version 1.16