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.12.0 lcov report (development 23171-a5c0ed393) Lines: 2353 2496 94.3 %
Date: 2018-10-20 05:38:07 Functions: 147 156 94.2 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
bnrnewprec_shallow 0
dbg_cancelrel 0
dbg_newrel 0
expand 0
i2print 0
isprincipalforce 0
isprincipalgen 0
isprincipalgenforce 0
wr_rel 0
bnfcompress 7
bnrnewprec 7
codeprimes 7
decode_pr_lists 7
sbnf2bnf 7
signunits 7
bnfnewprec 14
be_honest 28
makematal 29
bnfnewprec_shallow 31
my_class_group_gen 31
bnf_build_matalpha 38
get_regulator 38
bnftestprimes 49
codeprime 49
decodeprime 49
isprincipalfact_or_fail 100
get_archclean 106
not_given 110
neg_row 250
setlg_col 483
Buchall_deg1 525
get_norm_fact_primes 885
get_y 896
powFBgen 1109
needed_bitprec 1146
bnfinit0 1183
famat_get_arch_real 1334
scalar_get_arch_real 1379
idealHNF_mulred 1562
powPgen 1656
makecycgen 1841
bnfisunit 2310
log_m1 2745
exp_OK 2855
inv_fact 2922
subFB_change 3083
makeunits 4881
try_elt 5320
inverse_if_smaller 6256
triv_arch 6863
famat_to_arch 6965
get_arch_real 7029
Buchall 7379
automorphism_perms 8030
compute_invres 8030
compute_vecG 8030
primeneeded 8030
class_group_gen 8068
automorphism_matrices 8079
extract_full_lattice 8126
getfu 8126
FB_aut_perm 8205
FBgen 8205
add_cyclotomic_units 8205
delete_FB 8205
delete_cache 8205
init_rel 8205
nfcyclotomicunits 8205
subFBgen 8205
unclone_subFB 8205
reallocate 8226
bnf_build_cycgen 8533
Buchall_param 8555
buchall_end 8562
get_clfu 8562
RgV_is1 8888
assign_subFB 8969
bad_check 10301
RgM_bit 10302
compute_R 10302
Vbase_to_FB 10534
pr_index 10583
clean_cols 11176
pr_orbit_fill 11878
shift_G 12649
low_prec 14008
nfsign_from_logarch 14490
idealmulpowprimered 15772
nthideal 16060
compute_multiple_of_R 16559
add_to_fact 16796
shift_embed 18668
idnorm 18768
isprincipalfact 22309
add_principal_part 22391
expandext 22409
nfsign_units 22617
free_GRHcheck 24304
init_GRHcheck 24304
get_random_ideal 25987
red 25987
rnd_rel 25987
bnf_build_units 27219
remove_content 27326
bad_subFB 33892
small_norm 36413
init_famat 39599
perm_log_embed 49373
triv_gen 52339
GRHchk 59473
trim_list 62778
pre_allocate 63887
isprincipal 101857
divide_p_id 103521
get_log_embed 104187
cache_prime_dec 126648
tailres 140038
init_red_mod_units 211190
red_mod_units 211190
get_arch 220783
get_norm_fact 242652
divide_p_quo 243418
fact_ok 243791
isprincipalarch 244937
GRHok 277061
tailresback 280076
split_ideal 336886
recover_partFB 336935
get_pr_lists 336942
bnf_get_W 336953
bnf_get_vbase 337002
isprincipalall 337845
prec_arch 345273
SPLIT 353224
bnfisprincipal0 367765
cleanarch 541431
set_fact 578044
act_arch 601122
add_rel 609070
add 617663
bnf_get_B 674767
bnf_get_C 683178
already_known 694766
add_rel_i 694907
compute_multiple_of_R_pivot 857217
get_fs 933589
divide_p_elt 1185050
addRe_modIm 1297320
scalar_bit 1501250
divide_p 1531989
Fincke_Pohst_ideal 1580089
factorgen 1920715
store 2478539
smooth_norm 3078759
can_factor 3189947
step 11013750

Generated by: LCOV version 1.13