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 30256-57c6c2b57f) Lines: 2197 2397 91.7 %
Date: 2025-05-09 09:19:30 Functions: 155 166 93.4 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
Buchall 62360
Buchall_deg1 1190
Buchall_param 64972
FB_aut_perm 66026
FBgen 66026
Fincke_Pohst_bound 264077
Fincke_Pohst_ideal 264078
FlxqX_chinese_unit 1379
GRHchk 494412
GRHok 1527895
RgC_expbitprec 1166926
RgM_expbitprec 48559
RgV_is1 105
SPLIT 1338551
SPLIT_i 1204259
SUnits_archclean 77
Ur_ZC_mul 1322143
Vbase_to_FB 3349
ZM_remove_unused 164
ZV_divrem 1322144
ZV_mul 7283
_nfnewprec 57719
act_arch 1986335
add 2127655
addRe_modIm 6592368
add_cyclotomic_units 63849
add_principal_part 32152
add_rel 2411989
add_rel_i 2888627
add_to_fact 2830382
already_known 2884492
assign_subFB 66765
automorphism_matrices 63838
automorphism_perms 63777
bad_check 95776
bad_subFB 306326
ballvol 66026
be_honest 7
bnf_build_cheapfu 263747
bnf_build_cycgen 26726
bnf_build_matalpha 20
bnf_build_units 32055
bnf_compactfu 37191
bnf_compactfu_mat 70
bnf_get_B 2644301
bnf_get_C 2678822
bnf_get_GD 276751
bnf_get_Ur 1322143
bnf_get_W 1327117
bnf_get_ga 271795
bnf_get_vbase 1322224
bnf_has_fu 264027
bnfinit0 2611
bnfisprincipal0 1769157
bnfnewprec 7
bnfnewprec_shallow 97
bnftestprimes 63
bnrnewprec 7
bnrnewprec_shallow 0
buchall_end 64967
cache_prime_dec 917656
can_factor 17993990
chinese_unit 94
chinese_unit_slice 274
chinese_unit_worker 274
class_group_gen 63776
clean_cols 91671
cleanarch 2927170
cleanarchunit 132957
compute_R 95837
compute_invres 63776
compute_multiple_of_R 120345
compute_multiple_of_R_pivot 559150
dbg_newrel 0
delete_FB 66026
delete_cache 63849
diagact_arch 63871
divide_p 5395993
divide_p_elt 2326
divide_p_id 163498
divide_p_quo 5230173
dump_gen 1157896
err_units 0
expand 0
expandext 32172
expbitprec 2686085
extract_full_lattice 63781
fact_ok 1158444
fact_update 1968477
factorgen 16651935
fixarch 1236086
free_GRHcheck 134077
genback 28770
get_archclean 40
get_clg2 63871
get_embs 121037
get_fs 7477113
get_log_embed 720842
get_norm_fact 1161317
get_norm_fact_primes 69
get_pr_lists 1322205
get_random_ideal 55176
get_regulator 48656
get_y 69
getfu 63776
i2print 0
idealHNF_mulred 3505
idealmulpowprime2 4488
init_GRHcheck 134077
init_famat 65524
init_red_mod_units 1039783
init_rel 63849
inv_fact 0
isprincipal 174513
isprincipalall 1338504
isprincipalarch 1166925
isprincipalfact 32172
isprincipalfact_or_fail 0
isprincipalforce 0
isprincipalgen 0
isprincipalgenforce 0
log2Mbound 94
log2fubound 94
makecycgen 4956
makematal 20
makeunits 24901
matbotid 62260
matbotidembs 54357
matenlarge 54358
modIm 201887
myprecdbl 73
needed_bitprec 3831
nf_cxlog_normalize 194924
nfcyclotomicunits 63849
nfsign_from_logarch 148923
nfsign_fu 228352
nfsign_tu 227196
nfsign_units 35
not_given 389
nthideal 63777
pr_index 3349
pr_orbit_fill 11865
pre_allocate 121078
prec_arch 1340299
primeneeded 63777
reallocate 63849
recover_partFB 1322205
red_mod_units 1039783
rel_embed 1007321
rnd_rel 55177
set_fact 2240175
set_rel_alpha 938899
signunits 7
small_norm 65829
split_ideal 1322141
step 27997043
store 9115109
subFB_change 26404
subFBgen 66026
tailres 1125241
tailresback 2250469
trim_list 121078
triv_gen 462888
try_elt 1631
vec_chinese_units 94
wr_rel 0

Generated by: LCOV version 1.16