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 30256-57c6c2b57f) Lines: 2197 2397 91.7 %
Date: 2025-05-07 09:19:00 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 1190
FlxqX_chinese_unit 1379
try_elt 1631
divide_p_elt 2327
bnfinit0 2611
Vbase_to_FB 3349
pr_index 3349
idealHNF_mulred 3509
needed_bitprec 3831
idealmulpowprime2 4488
makecycgen 4956
ZV_mul 7283
pr_orbit_fill 11865
makeunits 24900
subFB_change 26386
bnf_build_cycgen 26726
genback 28770
bnf_build_units 32054
add_principal_part 32152
expandext 32173
isprincipalfact 32173
bnf_compactfu 37190
RgM_expbitprec 48559
get_regulator 48655
matbotidembs 54338
matenlarge 54338
get_random_ideal 55156
rnd_rel 55156
_nfnewprec 57719
matbotid 62260
Buchall 62360
compute_invres 63775
class_group_gen 63776
automorphism_perms 63777
getfu 63777
nthideal 63777
primeneeded 63777
extract_full_lattice 63781
automorphism_matrices 63840
init_rel 63848
reallocate 63848
add_cyclotomic_units 63849
delete_cache 63849
nfcyclotomicunits 63849
diagact_arch 63871
get_clg2 63871
buchall_end 64967
Buchall_param 64971
init_famat 65525
small_norm 65828
FB_aut_perm 66025
FBgen 66026
ballvol 66026
delete_FB 66026
subFBgen 66026
assign_subFB 66774
clean_cols 91661
bad_check 95773
compute_R 95836
compute_multiple_of_R 120330
get_embs 121017
pre_allocate 121057
trim_list 121057
cleanarchunit 132956
init_GRHcheck 134073
free_GRHcheck 134076
nfsign_from_logarch 148925
divide_p_id 163500
isprincipal 174513
nf_cxlog_normalize 194924
modIm 201887
nfsign_tu 227193
nfsign_fu 228356
bnf_build_cheapfu 263744
bnf_has_fu 264021
Fincke_Pohst_bound 264064
Fincke_Pohst_ideal 264064
bnf_get_ga 271795
bnf_get_GD 276751
bad_subFB 306300
triv_gen 462889
GRHchk 494410
compute_multiple_of_R_pivot 560035
get_log_embed 720819
cache_prime_dec 917663
set_rel_alpha 938949
rel_embed 1007349
init_red_mod_units 1039783
red_mod_units 1039783
tailres 1125184
dump_gen 1157899
fact_ok 1158447
get_norm_fact 1161318
RgC_expbitprec 1166928
isprincipalarch 1166929
SPLIT_i 1204257
fixarch 1236090
split_ideal 1322137
Ur_ZC_mul 1322143
bnf_get_Ur 1322143
ZV_divrem 1322144
get_pr_lists 1322202
recover_partFB 1322202
bnf_get_vbase 1322219
bnf_get_W 1327112
isprincipalall 1338503
SPLIT 1338545
prec_arch 1340296
GRHok 1527861
bnfisprincipal0 1769152
fact_update 1968577
act_arch 1986336
add 2127655
set_fact 2240167
tailresback 2250338
add_rel 2411950
bnf_get_B 2644297
bnf_get_C 2678819
expbitprec 2686087
add_to_fact 2830379
already_known 2884487
add_rel_i 2888616
cleanarch 2927180
divide_p_quo 5230183
divide_p 5396006
addRe_modIm 6592356
get_fs 7476786
store 9115113
factorgen 16651900
can_factor 17993958
step 27995898

Generated by: LCOV version 1.16