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 30482-15ec328664) Lines: 2205 2405 91.7 %
Date: 2025-09-07 09:24:11 Functions: 156 167 93.4 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
Buchall 62600
Buchall_deg1 1204
Buchall_param 65225
FB_aut_perm 66268
FBgen 66267
Fincke_Pohst_bound 266164
Fincke_Pohst_ideal 266166
FlxqX_chinese_unit 1379
GRHchk 496363
GRHok 1532844
RgC_expbitprec 1234945
RgM_expbitprec 48797
RgV_is1 105
SPLIT 1406567
SPLIT_i 1250410
SUnits_archclean 77
Ur_ZC_mul 1390162
Vbase_to_FB 3349
ZM_remove_unused 164
ZV_divrem 1390163
ZV_mul 7283
_nfnewprec 57729
act_arch 2055137
add 2247980
addRe_modIm 6901150
add_cyclotomic_units 64091
add_principal_part 32171
add_rel 2426496
add_rel_i 2909981
add_to_fact 2845220
already_known 2905834
assign_subFB 67040
automorphism_matrices 64078
automorphism_perms 64015
bad_check 96203
bad_subFB 307621
ballvol 66268
be_honest 7
bnf_build_cheapfu 285485
bnf_build_cycgen 26726
bnf_build_matalpha 20
bnf_build_units 50731
bnf_compactfu 37415
bnf_compactfu_mat 70
bnf_get_B 2780341
bnf_get_C 2814914
bnf_get_GD 276769
bnf_get_Ur 1390162
bnf_get_W 1395138
bnf_get_ga 271813
bnf_get_vbase 1390245
bnf_has_fu 285764
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 18215993
chinese_unit 94
chinese_unit_slice 274
chinese_unit_worker 274
class_group_gen 64015
clean_cols 93042
cleanarch 3066392
cleanarchunit 133886
compute_R 96262
compute_invres 64014
compute_multiple_of_R 121732
compute_multiple_of_R_pivot 576855
dbg_newrel 0
delete_FB 66268
delete_cache 64091
diagact_arch 64112
divide_p 5474498
divide_p_elt 2409
divide_p_id 185365
divide_p_quo 5286726
dump_gen 1225896
err_units 0
expand 0
expandext 32194
expbitprec 2838181
extract_full_lattice 64022
fact_ok 1226445
fact_update 1978614
factorgen 16805896
fixarch 1304798
free_GRHcheck 134680
genback 28777
get_archclean 40
get_clg2 64112
get_embs 122426
get_fs 7512149
get_log_embed 725472
get_norm_fact 1229334
get_norm_fact_primes 69
get_pr_lists 1390225
get_random_ideal 55640
get_regulator 48893
get_y 69
getfu 64014
i2print 0
idealHNF_mulred 3508
idealmulpowprime2 4488
init_GRHcheck 134679
init_famat 65763
init_red_mod_units 1107798
init_rel 64090
inv_fact 0
isprincipal 174534
isprincipalall 1406544
isprincipalarch 1234944
isprincipalfact 32194
isprincipalfact_or_fail 0
isprincipalforce 0
isprincipalgen 0
isprincipalgenforce 0
log2Mbound 94
log2fubound 94
makecycgen 4956
makematal 20
makeunits 24908
matbotid 62495
matbotidembs 55499
matenlarge 55499
modIm 204633
myprecdbl 73
needed_bitprec 3849
nf_cxlog_normalize 194924
nfcyclotomicunits 64091
nfsign_from_logarch 162327
nfsign_fu 241151
nfsign_tu 239982
nfsign_units 35
not_given 396
nthideal 64015
pr_index 3349
pr_orbit_fill 11865
pre_allocate 122465
prec_arch 1408350
primeneeded 64015
reallocate 64090
recover_partFB 1390225
red_mod_units 1107798
rel_embed 1016386
rnd_rel 55640
set_fact 2253730
set_rel_alpha 947793
signunits 7
small_norm 66749
small_norm_prec 64012
split_ideal 1390162
step 28183733
store 9210279
subFB_change 26402
subFBgen 66268
tailres 1129551
tailresback 2259091
trim_list 122465
triv_gen 464583
try_elt 1703
vec_chinese_units 94
wr_rel 0

Generated by: LCOV version 1.16