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 30446-bebd557ed6) Lines: 2205 2405 91.7 %
Date: 2025-08-06 09:23:53 Functions: 156 167 93.4 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
Buchall 62604
Buchall_deg1 1204
Buchall_param 65228
FB_aut_perm 66265
FBgen 66265
Fincke_Pohst_bound 266123
Fincke_Pohst_ideal 266122
FlxqX_chinese_unit 1379
GRHchk 496362
GRHok 1532869
RgC_expbitprec 1234944
RgM_expbitprec 48797
RgV_is1 105
SPLIT 1406569
SPLIT_i 1250410
SUnits_archclean 77
Ur_ZC_mul 1390162
Vbase_to_FB 3349
ZM_remove_unused 164
ZV_divrem 1390161
ZV_mul 7283
_nfnewprec 57725
act_arch 2055136
add 2247990
addRe_modIm 6901093
add_cyclotomic_units 64088
add_principal_part 32173
add_rel 2426362
add_rel_i 2909735
add_to_fact 2845125
already_known 2905595
assign_subFB 67019
automorphism_matrices 64077
automorphism_perms 64015
bad_check 96170
bad_subFB 307593
ballvol 66264
be_honest 7
bnf_build_cheapfu 285469
bnf_build_cycgen 26724
bnf_build_matalpha 20
bnf_build_units 50731
bnf_compactfu 37415
bnf_compactfu_mat 70
bnf_get_B 2780336
bnf_get_C 2814916
bnf_get_GD 276769
bnf_get_Ur 1390162
bnf_get_W 1395135
bnf_get_ga 271813
bnf_get_vbase 1390242
bnf_has_fu 285749
bnfinit0 2625
bnfisprincipal0 1838869
bnfnewprec 7
bnfnewprec_shallow 97
bnftestprimes 63
bnrnewprec 7
bnrnewprec_shallow 0
buchall_end 65219
cache_prime_dec 921169
can_factor 18216005
chinese_unit 94
chinese_unit_slice 274
chinese_unit_worker 274
class_group_gen 64015
clean_cols 93021
cleanarch 3066363
cleanarchunit 133887
compute_R 96233
compute_invres 64014
compute_multiple_of_R 121685
compute_multiple_of_R_pivot 576754
dbg_newrel 0
delete_FB 66265
delete_cache 64088
diagact_arch 64109
divide_p 5474288
divide_p_elt 2347
divide_p_id 185366
divide_p_quo 5286577
dump_gen 1225898
err_units 0
expand 0
expandext 32194
expbitprec 2838181
extract_full_lattice 64021
fact_ok 1226445
fact_update 1978548
factorgen 16805901
fixarch 1304800
free_GRHcheck 134680
genback 28777
get_archclean 40
get_clg2 64109
get_embs 122370
get_fs 7512216
get_log_embed 725382
get_norm_fact 1229332
get_norm_fact_primes 69
get_pr_lists 1390226
get_random_ideal 55604
get_regulator 48894
get_y 69
getfu 64015
i2print 0
idealHNF_mulred 3512
idealmulpowprime2 4488
init_GRHcheck 134677
init_famat 65763
init_red_mod_units 1107799
init_rel 64088
inv_fact 0
isprincipal 174534
isprincipalall 1406543
isprincipalarch 1234945
isprincipalfact 32194
isprincipalfact_or_fail 0
isprincipalforce 0
isprincipalgen 0
isprincipalgenforce 0
log2Mbound 94
log2fubound 94
makecycgen 4956
makematal 20
makeunits 24908
matbotid 62492
matbotidembs 55446
matenlarge 55446
modIm 204635
myprecdbl 73
needed_bitprec 3849
nf_cxlog_normalize 194924
nfcyclotomicunits 64088
nfsign_from_logarch 162317
nfsign_fu 241158
nfsign_tu 239976
nfsign_units 35
not_given 396
nthideal 64014
pr_index 3349
pr_orbit_fill 11865
pre_allocate 122408
prec_arch 1408354
primeneeded 64015
reallocate 64088
recover_partFB 1390226
red_mod_units 1107799
rel_embed 1016217
rnd_rel 55605
set_fact 2253597
set_rel_alpha 947718
signunits 7
small_norm 66732
small_norm_prec 64013
split_ideal 1390159
step 28183566
store 9209910
subFB_change 26415
subFBgen 66264
tailres 1129545
tailresback 2259088
trim_list 122408
triv_gen 464583
try_elt 1650
vec_chinese_units 94
wr_rel 0

Generated by: LCOV version 1.16