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 30381-2cde8c54db) Lines: 2197 2397 91.7 %
Date: 2025-07-09 09:23:19 Functions: 155 166 93.4 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
Buchall 62597
Buchall_deg1 1204
Buchall_param 65217
FB_aut_perm 66261
FBgen 66258
Fincke_Pohst_bound 265632
Fincke_Pohst_ideal 265633
FlxqX_chinese_unit 1379
GRHchk 496210
GRHok 1532620
RgC_expbitprec 1234926
RgM_expbitprec 48789
RgV_is1 105
SPLIT 1406547
SPLIT_i 1250411
SUnits_archclean 77
Ur_ZC_mul 1390140
Vbase_to_FB 3349
ZM_remove_unused 164
ZV_divrem 1390141
ZV_mul 7283
_nfnewprec 57716
act_arch 2055033
add 2247857
addRe_modIm 6896414
add_cyclotomic_units 64084
add_principal_part 32152
add_rel 2422524
add_rel_i 2905930
add_to_fact 2841522
already_known 2901791
assign_subFB 67022
automorphism_matrices 64071
automorphism_perms 64008
bad_check 96123
bad_subFB 307512
ballvol 66261
be_honest 7
bnf_build_cheapfu 285473
bnf_build_cycgen 26726
bnf_build_matalpha 20
bnf_build_units 50731
bnf_compactfu 37415
bnf_compactfu_mat 70
bnf_get_B 2780301
bnf_get_C 2814830
bnf_get_GD 276751
bnf_get_Ur 1390140
bnf_get_W 1395116
bnf_get_ga 271795
bnf_get_vbase 1390223
bnf_has_fu 285754
bnfinit0 2618
bnfisprincipal0 1838850
bnfnewprec 7
bnfnewprec_shallow 97
bnftestprimes 63
bnrnewprec 7
bnrnewprec_shallow 0
buchall_end 65212
cache_prime_dec 920992
can_factor 18122332
chinese_unit 94
chinese_unit_slice 274
chinese_unit_worker 274
class_group_gen 64007
clean_cols 93011
cleanarch 3064790
cleanarchunit 133867
compute_R 96186
compute_invres 64008
compute_multiple_of_R 121649
compute_multiple_of_R_pivot 576964
dbg_newrel 0
delete_FB 66261
delete_cache 64084
diagact_arch 64104
divide_p 5458817
divide_p_elt 2415
divide_p_id 185345
divide_p_quo 5271060
dump_gen 1225896
err_units 0
expand 0
expandext 32173
expbitprec 2838084
extract_full_lattice 64013
fact_ok 1226444
fact_update 1978659
factorgen 16712234
fixarch 1304761
free_GRHcheck 134657
genback 28770
get_archclean 40
get_clg2 64104
get_embs 122337
get_fs 7507646
get_log_embed 723809
get_norm_fact 1229314
get_norm_fact_primes 69
get_pr_lists 1390205
get_random_ideal 55562
get_regulator 48887
get_y 69
getfu 64006
i2print 0
idealHNF_mulred 3510
idealmulpowprime2 4488
init_GRHcheck 134655
init_famat 65753
init_red_mod_units 1107781
init_rel 64084
inv_fact 0
isprincipal 174513
isprincipalall 1406502
isprincipalarch 1234926
isprincipalfact 32173
isprincipalfact_or_fail 0
isprincipalforce 0
isprincipalgen 0
isprincipalgenforce 0
log2Mbound 94
log2fubound 94
makecycgen 4956
makematal 20
makeunits 24908
matbotid 62488
matbotidembs 55417
matenlarge 55417
modIm 204584
myprecdbl 73
needed_bitprec 3831
nf_cxlog_normalize 194924
nfcyclotomicunits 64084
nfsign_from_logarch 162323
nfsign_fu 241153
nfsign_tu 239989
nfsign_units 35
not_given 389
nthideal 64008
pr_index 3349
pr_orbit_fill 11865
pre_allocate 122376
prec_arch 1408311
primeneeded 64008
reallocate 64084
recover_partFB 1390205
red_mod_units 1107781
rel_embed 1014658
rnd_rel 55562
set_fact 2250030
set_rel_alpha 946058
signunits 7
small_norm 66737
split_ideal 1390140
step 28026080
store 9190952
subFB_change 26374
subFBgen 66261
tailres 1129376
tailresback 2258746
trim_list 122376
triv_gen 464583
try_elt 1700
vec_chinese_units 94
wr_rel 0

Generated by: LCOV version 1.16