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 30318-7d854b8994) Lines: 2197 2397 91.7 %
Date: 2025-06-06 09:19:58 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 2385
bnfinit0 2611
Vbase_to_FB 3349
pr_index 3349
idealHNF_mulred 3517
needed_bitprec 3831
idealmulpowprime2 4488
makecycgen 4956
ZV_mul 7283
pr_orbit_fill 11865
makeunits 24901
subFB_change 26440
bnf_build_cycgen 26726
genback 28770
bnf_build_units 32055
add_principal_part 32152
expandext 32172
isprincipalfact 32172
bnf_compactfu 37191
RgM_expbitprec 48559
get_regulator 48656
matbotidembs 54424
matenlarge 54425
get_random_ideal 55239
rnd_rel 55239
_nfnewprec 57722
matbotid 62263
Buchall 62380
nthideal 63775
compute_invres 63776
primeneeded 63776
automorphism_perms 63777
class_group_gen 63777
getfu 63777
extract_full_lattice 63784
automorphism_matrices 63839
add_cyclotomic_units 63852
delete_cache 63852
init_rel 63852
nfcyclotomicunits 63852
reallocate 63852
diagact_arch 63872
get_clg2 63872
buchall_end 64980
Buchall_param 64992
init_famat 65525
small_norm 65832
ballvol 66027
subFBgen 66027
FBgen 66028
delete_FB 66028
FB_aut_perm 66029
assign_subFB 66771
clean_cols 91716
bad_check 95852
compute_R 95914
compute_multiple_of_R 120426
get_embs 121106
pre_allocate 121146
trim_list 121146
cleanarchunit 132955
init_GRHcheck 134095
free_GRHcheck 134098
nfsign_from_logarch 148921
divide_p_id 163506
isprincipal 174513
nf_cxlog_normalize 194924
modIm 201886
nfsign_tu 227404
nfsign_fu 228572
bnf_build_cheapfu 263961
Fincke_Pohst_ideal 264167
Fincke_Pohst_bound 264170
bnf_has_fu 264240
bnf_get_ga 271795
bnf_get_GD 276751
bad_subFB 306413
triv_gen 464583
GRHchk 494422
compute_multiple_of_R_pivot 560069
get_log_embed 720964
cache_prime_dec 917626
set_rel_alpha 939069
rel_embed 1007568
init_red_mod_units 1039783
red_mod_units 1039783
tailres 1125249
dump_gen 1157900
fact_ok 1158450
get_norm_fact 1161316
RgC_expbitprec 1166926
isprincipalarch 1166926
SPLIT_i 1204260
fixarch 1236089
Ur_ZC_mul 1322142
ZV_divrem 1322142
bnf_get_Ur 1322142
split_ideal 1322142
get_pr_lists 1322206
recover_partFB 1322206
bnf_get_vbase 1322225
bnf_get_W 1327118
isprincipalall 1338504
SPLIT 1338545
prec_arch 1340295
GRHok 1527998
bnfisprincipal0 1770850
fact_update 1969239
act_arch 1986353
add 2127734
set_fact 2240567
tailresback 2250486
add_rel 2412369
bnf_get_B 2644304
bnf_get_C 2678819
expbitprec 2686085
add_to_fact 2830724
already_known 2885036
add_rel_i 2889179
cleanarch 2927185
divide_p_quo 5230867
divide_p 5396750
addRe_modIm 6592371
get_fs 7477361
store 9116303
factorgen 16653131
can_factor 17995203
step 27998889

Generated by: LCOV version 1.16