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 30316-0578a48613) Lines: 2197 2397 91.7 %
Date: 2025-06-01 09:19: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 1204
FlxqX_chinese_unit 1379
try_elt 1680
divide_p_elt 2388
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 26404
bnf_build_cycgen 26724
genback 28770
bnf_build_units 32055
add_principal_part 32152
expandext 32169
isprincipalfact 32170
bnf_compactfu 37191
RgM_expbitprec 48559
get_regulator 48656
matbotidembs 54338
matenlarge 54338
get_random_ideal 55155
rnd_rel 55155
_nfnewprec 57721
matbotid 62263
Buchall 62375
primeneeded 63776
automorphism_perms 63777
class_group_gen 63777
compute_invres 63777
getfu 63777
nthideal 63777
extract_full_lattice 63783
automorphism_matrices 63840
add_cyclotomic_units 63852
delete_cache 63852
init_rel 63852
nfcyclotomicunits 63852
reallocate 63852
diagact_arch 63873
get_clg2 63873
buchall_end 64981
Buchall_param 64987
init_famat 65525
small_norm 65826
FBgen 66027
ballvol 66028
FB_aut_perm 66029
delete_FB 66029
subFBgen 66029
assign_subFB 66769
clean_cols 91677
bad_check 95768
compute_R 95831
compute_multiple_of_R 120341
get_embs 121019
pre_allocate 121056
trim_list 121056
cleanarchunit 132954
init_GRHcheck 134094
free_GRHcheck 134097
nfsign_from_logarch 148923
divide_p_id 163506
isprincipal 174513
nf_cxlog_normalize 194924
modIm 201888
nfsign_tu 227413
nfsign_fu 228584
bnf_build_cheapfu 263966
Fincke_Pohst_bound 264070
Fincke_Pohst_ideal 264076
bnf_has_fu 264234
bnf_get_ga 271795
bnf_get_GD 276751
bad_subFB 306358
triv_gen 464583
GRHchk 494428
compute_multiple_of_R_pivot 559280
get_log_embed 720875
cache_prime_dec 917641
set_rel_alpha 938838
rel_embed 1007340
init_red_mod_units 1039783
red_mod_units 1039783
tailres 1125242
dump_gen 1157896
fact_ok 1158448
get_norm_fact 1161314
isprincipalarch 1166925
RgC_expbitprec 1166930
SPLIT_i 1204258
fixarch 1236089
ZV_divrem 1322143
split_ideal 1322143
Ur_ZC_mul 1322144
bnf_get_Ur 1322144
get_pr_lists 1322206
recover_partFB 1322206
bnf_get_vbase 1322226
bnf_get_W 1327119
isprincipalall 1338504
SPLIT 1338551
prec_arch 1340300
GRHok 1527992
bnfisprincipal0 1770851
fact_update 1968849
act_arch 1986359
add 2127725
set_fact 2240470
tailresback 2250476
add_rel 2412262
bnf_get_B 2644302
bnf_get_C 2678823
expbitprec 2686089
add_to_fact 2830618
already_known 2884804
add_rel_i 2888935
cleanarch 2927190
divide_p_quo 5230736
divide_p 5396626
addRe_modIm 6592402
get_fs 7477701
store 9116053
factorgen 16652791
can_factor 17994902
step 27999102

Generated by: LCOV version 1.16