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 30483-b6b1f87815) Lines: 2205 2405 91.7 %
Date: 2025-09-12 09:24:16 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 66266
FBgen 66263
Fincke_Pohst_bound 266129
Fincke_Pohst_ideal 266131
FlxqX_chinese_unit 1378
GRHchk 496363
GRHok 1532890
RgC_expbitprec 1234945
RgM_expbitprec 48797
RgV_is1 105
SPLIT 1406565
SPLIT_i 1250405
SUnits_archclean 77
Ur_ZC_mul 1390162
Vbase_to_FB 3349
ZM_remove_unused 164
ZV_divrem 1390162
ZV_mul 7283
_nfnewprec 57727
act_arch 2055139
add 2247983
addRe_modIm 6901101
add_cyclotomic_units 64089
add_principal_part 32173
add_rel 2426321
add_rel_i 2909768
add_to_fact 2845071
already_known 2905636
assign_subFB 67030
automorphism_matrices 64077
automorphism_perms 64015
bad_check 96169
bad_subFB 307572
ballvol 66265
be_honest 7
bnf_build_cheapfu 285463
bnf_build_cycgen 26725
bnf_build_matalpha 20
bnf_build_units 50731
bnf_compactfu 37415
bnf_compactfu_mat 70
bnf_get_B 2780331
bnf_get_C 2814911
bnf_get_GD 276768
bnf_get_Ur 1390162
bnf_get_W 1395127
bnf_get_ga 271813
bnf_get_vbase 1390235
bnf_has_fu 285765
bnfinit0 2625
bnfisprincipal0 1838868
bnfnewprec 7
bnfnewprec_shallow 97
bnftestprimes 63
bnrnewprec 7
bnrnewprec_shallow 0
buchall_end 65218
cache_prime_dec 921182
can_factor 18216053
chinese_unit 94
chinese_unit_slice 274
chinese_unit_worker 274
class_group_gen 64015
clean_cols 93025
cleanarch 3066362
cleanarchunit 133888
compute_R 96231
compute_invres 64014
compute_multiple_of_R 121698
compute_multiple_of_R_pivot 577254
dbg_newrel 0
delete_FB 66265
delete_cache 64089
diagact_arch 64112
divide_p 5474177
divide_p_elt 2372
divide_p_id 185366
divide_p_quo 5286442
dump_gen 1225897
err_units 0
expand 0
expandext 32194
expbitprec 2838183
extract_full_lattice 64020
fact_ok 1226447
fact_update 1978486
factorgen 16806015
fixarch 1304796
free_GRHcheck 134679
genback 28776
get_archclean 40
get_clg2 64112
get_embs 122384
get_fs 7512043
get_log_embed 725405
get_norm_fact 1229330
get_norm_fact_primes 69
get_pr_lists 1390215
get_random_ideal 55617
get_regulator 48891
get_y 69
getfu 64015
i2print 0
idealHNF_mulred 3510
idealmulpowprime2 4488
init_GRHcheck 134680
init_famat 65763
init_red_mod_units 1107799
init_rel 64089
inv_fact 0
isprincipal 174534
isprincipalall 1406543
isprincipalarch 1234942
isprincipalfact 32194
isprincipalfact_or_fail 0
isprincipalforce 0
isprincipalgen 0
isprincipalgenforce 0
log2Mbound 94
log2fubound 94
makecycgen 4955
makematal 20
makeunits 24908
matbotid 62493
matbotidembs 55458
matenlarge 55459
modIm 204628
myprecdbl 73
needed_bitprec 3849
nf_cxlog_normalize 194924
nfcyclotomicunits 64089
nfsign_from_logarch 162323
nfsign_fu 241157
nfsign_tu 239983
nfsign_units 35
not_given 396
nthideal 64015
pr_index 3349
pr_orbit_fill 11865
pre_allocate 122424
prec_arch 1408354
primeneeded 64015
reallocate 64089
recover_partFB 1390215
red_mod_units 1107799
rel_embed 1016336
rnd_rel 55617
set_fact 2253547
set_rel_alpha 947761
signunits 7
small_norm 66733
small_norm_prec 64013
split_ideal 1390152
step 28184015
store 9209767
subFB_change 26388
subFBgen 66264
tailres 1129568
tailresback 2259136
trim_list 122424
triv_gen 464583
try_elt 1662
vec_chinese_units 94
wr_rel 0

Generated by: LCOV version 1.16