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 30462-6c568f4018) Lines: 2205 2405 91.7 %
Date: 2025-08-10 09:24:05 Functions: 156 167 93.4 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
Buchall 62598
Buchall_deg1 1204
Buchall_param 65223
FB_aut_perm 66267
FBgen 66265
Fincke_Pohst_bound 266182
Fincke_Pohst_ideal 266187
FlxqX_chinese_unit 1379
GRHchk 496365
GRHok 1532870
RgC_expbitprec 1234945
RgM_expbitprec 48797
RgV_is1 105
SPLIT 1406567
SPLIT_i 1250411
SUnits_archclean 77
Ur_ZC_mul 1390162
Vbase_to_FB 3349
ZM_remove_unused 164
ZV_divrem 1390162
ZV_mul 7283
_nfnewprec 57730
act_arch 2055133
add 2247973
addRe_modIm 6901118
add_cyclotomic_units 64089
add_principal_part 32173
add_rel 2426528
add_rel_i 2910068
add_to_fact 2845284
already_known 2905933
assign_subFB 67034
automorphism_matrices 64078
automorphism_perms 64015
bad_check 96226
bad_subFB 307608
ballvol 66267
be_honest 7
bnf_build_cheapfu 285471
bnf_build_cycgen 26726
bnf_build_matalpha 20
bnf_build_units 50730
bnf_compactfu 37415
bnf_compactfu_mat 70
bnf_get_B 2780338
bnf_get_C 2814916
bnf_get_GD 276769
bnf_get_Ur 1390162
bnf_get_W 1395136
bnf_get_ga 271813
bnf_get_vbase 1390243
bnf_has_fu 285750
bnfinit0 2625
bnfisprincipal0 1838866
bnfnewprec 7
bnfnewprec_shallow 97
bnftestprimes 63
bnrnewprec 7
bnrnewprec_shallow 0
buchall_end 65219
cache_prime_dec 921176
can_factor 18216337
chinese_unit 94
chinese_unit_slice 274
chinese_unit_worker 274
class_group_gen 64015
clean_cols 93047
cleanarch 3066372
cleanarchunit 133887
compute_R 96288
compute_invres 64015
compute_multiple_of_R 121748
compute_multiple_of_R_pivot 577540
dbg_newrel 0
delete_FB 66267
delete_cache 64090
diagact_arch 64112
divide_p 5474461
divide_p_elt 2385
divide_p_id 185366
divide_p_quo 5286713
dump_gen 1225897
err_units 0
expand 0
expandext 32194
expbitprec 2838180
extract_full_lattice 64021
fact_ok 1226447
fact_update 1978715
factorgen 16806253
fixarch 1304797
free_GRHcheck 134680
genback 28777
get_archclean 40
get_clg2 64112
get_embs 122425
get_fs 7512050
get_log_embed 725483
get_norm_fact 1229334
get_norm_fact_primes 69
get_pr_lists 1390225
get_random_ideal 55644
get_regulator 48894
get_y 69
getfu 64015
i2print 0
idealHNF_mulred 3507
idealmulpowprime2 4488
init_GRHcheck 134679
init_famat 65762
init_red_mod_units 1107798
init_rel 64090
inv_fact 0
isprincipal 174534
isprincipalall 1406544
isprincipalarch 1234942
isprincipalfact 32193
isprincipalfact_or_fail 0
isprincipalforce 0
isprincipalgen 0
isprincipalgenforce 0
log2Mbound 94
log2fubound 94
makecycgen 4956
makematal 20
makeunits 24907
matbotid 62494
matbotidembs 55500
matenlarge 55500
modIm 204625
myprecdbl 73
needed_bitprec 3849
nf_cxlog_normalize 194924
nfcyclotomicunits 64089
nfsign_from_logarch 162321
nfsign_fu 241149
nfsign_tu 239974
nfsign_units 35
not_given 396
nthideal 64015
pr_index 3349
pr_orbit_fill 11865
pre_allocate 122464
prec_arch 1408353
primeneeded 64015
reallocate 64090
recover_partFB 1390225
red_mod_units 1107799
rel_embed 1016463
rnd_rel 55645
set_fact 2253747
set_rel_alpha 947868
signunits 7
small_norm 66745
small_norm_prec 64014
split_ideal 1390160
step 28185308
store 9210204
subFB_change 26410
subFBgen 66267
tailres 1129519
tailresback 2259022
trim_list 122464
triv_gen 464583
try_elt 1684
vec_chinese_units 94
wr_rel 0

Generated by: LCOV version 1.16