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 - base1.c (source / functions) Hit Total Coverage
Test: PARI/GP v2.16.2 lcov report (development 29115-f22e516b23) Lines: 1713 1803 95.0 %
Date: 2024-04-20 08:07:50 Functions: 139 156 89.1 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
FpX_FpC_nfpoleval 8824
Polred 84
QX_table_nfpoleval 94942
RgFV_to_FlxqV 1239
RgF_to_Flxq 8092
ZC_galoisapply 95135
ZM_image_shallow 12689
ZXX_Q_mul 8897
ZX_Q_mul 6356783
ZX_Q_normalize 840989
ZX_Z_normalize 843939
ZX_canon_neg 89019
ZX_cmp 29970
ZX_is_better 51612
ZX_primitive_to_monic 841305
ZX_to_monic 0
badp 49
check_ZKmodule 10519
check_ZKmodule_i 10575
checkabgrp 19817
checkbid 1381090
checkbid_i 1637972
checkbnf 3232547
checkbnf_i 5242501
checkbnr 1821642
checkbnr_i 2004770
checknf 103989806
checknf_i 107010376
checknfelt_mod 555846
checkrnf 298007
checkrnf_i 308167
checksqmat 0
chk_gen 98081
chk_gen_init 14042
chk_gen_prec 32165
cmpii_polred 125764
complex_norm 34896413
elt_galoisapply 49
elt_galoismatrixapply 0
embed_T2 70948
embed_norm 18934048
embednorm_T2 0
factoredpolred 0
factoredpolred2 0
filter 4095
findmindisc 14049
gal_check_pol 2485
galoisapply 126372
get_Tr 83624
get_aut 8162
get_bas_den 202514
get_bnf 22099
get_bnfpol 112
get_nf 115542
get_nfindex 1666
get_nfpol 667348
get_pol 260238
get_polchar 98081
get_red_G 72848
get_roots 234735
idealfrobenius 77
idealfrobenius_aut 70
idealinertiagroup 1834
idealquasifrob 1463
idealramfrobenius 0
idealramfrobenius_aut 616
idealramgroups 126
idealramgroups_aut 2408
idealramgroupstame 1911
idealramgroupswild 497
incl_disc 539
make_G 265897
make_M 265905
make_M_G 265904
make_Tr 27975
nf_basden 91311
nf_get_allroots 0
nf_get_prec 971698
nf_input_type 85470
nf_multable 83625
nfcertify 3101
nffp_init 174602
nfgaloismatrix 94528
nfgaloismatrixapply 13909
nfgaloispermtobasis 1379
nfinit 6226
nfinit0 10160
nfinit_basic 85470
nfinit_basic_flag 14119
nfinit_basic_partial 3906
nfinit_complete 83624
nfinitred 182
nfinitred2 0
nfisincl 112
nfisincl0 7308
nfisincl_from_fact 7196
nfisincl_from_fact_frac 1232
nfisisom 77
nfmaxord_complete 167248
nfmaxord_to_nf 83624
nfnewprec 154
nfnewprec_shallow 91283
nfpoleval 11151
nfpolred 280
nfsplitting 0
nfsplitting0 1435
nfsplitting_auto 1232
nfsplitting_composite 1421
nftyp 274336
partmap_reverse 7315
partmap_reverse_frac 8085
partmap_reverse_frac_worker 8085
polred 14
polred0 70
polred2 0
polred_aux 4130
polred_init 18137
polredabs 13377
polredabs0 13825
polredabs2 0
polredabs_i 14049
polredabsall 0
polredbest 3514
polredbest_aux 4053
polredbest_i 3871
polredord 21
poltomonic 42
pr_galoisapply 7
pr_galoismatrixapply 0
pr_make 7
prec_fix 298069
primes_certify 3101
quicktrace 381748
rawcheckbnf 46598
rawchecknf 45639
real_norm 160668
remove_duplicates 13825
rnfpolred_i 588
rnfpolredabs 231
rnfpolredbest 357
set_LLL_basis 101481
set_mulid 22302
smallpolred 0
smallpolred2 0
tests_OK 287
try_polmin 136085
tschirnhaus 7648
typv6 113169
v10checknf 233037
v11checkbnf 37435
v13checkgchar 819
v13checkrnf 298609
v9checkgal 658
vecgaloisapply 7
vecgaloismatrixapply 0
zk_galoisapplymod 6255

Generated by: LCOV version 1.14