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 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 - RgX.c (source / functions) Hit Total Coverage
Test: PARI/GP v2.10.0 lcov report (development 20277-2bd9113) Lines: 1272 1381 92.1 %
Date: 2017-02-21 05:49:51 Functions: 139 150 92.7 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
Kronecker_to_mod 189
QXQV_to_mod 1037
QXQXV_to_mod 539
QXQX_to_mod 1918
QXQX_to_mod_shallow 83111
QXQ_powers 1393
QXQ_to_mod 408321
QXQ_to_mod_copy 14375
QXV_QXQ_eval 777
QXX_QXQ_eval 42
QX_ZXQV_eval 1729
RgM_to_RgXV 35383
RgM_to_RgXX 15309
RgV_to_RgM 6202
RgV_to_RgX 359858
RgV_to_RgX_reverse 149566
RgXQC_red 0
RgXQM_mul 0
RgXQM_red 0
RgXQV_RgXQ_mul 56
RgXQV_red 56
RgXQX_RgXQ_mul 28
RgXQX_divrem 21096
RgXQX_mul 1659
RgXQX_pseudodivrem 45403
RgXQX_pseudorem 68515
RgXQX_red 5530
RgXQX_sqr 0
RgXQX_translate 6048
RgXQ_matrix_pow 287
RgXQ_minpoly_naive 56
RgXQ_norm 33029
RgXQ_pow 30050
RgXQ_powers 1701
RgXQ_powu 180494
RgXV_RgV_eval 203
RgXV_to_RgM 5355
RgXV_unscale 203
RgXX_to_RgM 21
RgXY_degreex 1
RgXY_swap 224
RgXY_swapspec 12978
RgX_RgV_eval 10073
RgX_RgXQV_eval 0
RgX_RgXQ_eval 44527
RgX_RgXnV_eval 672
RgX_RgXn_eval 0
RgX_Rg_add 10698427
RgX_Rg_add_shallow 2422
RgX_Rg_div 22303130
RgX_Rg_divexact 953045
RgX_Rg_eval_bk 0
RgX_Rg_mul 65817346
RgX_Rg_sub 32215
RgX_add 16440030
RgX_blocks 70168
RgX_deflate 73706
RgX_deriv 265087
RgX_div_by_X_x 31727
RgX_divrem 13162154
RgX_divs 1729
RgX_equal 3983182
RgX_even_odd 25535
RgX_get_0 128107
RgX_get_1 568713
RgX_inflate 109592
RgX_mul 11081936
RgX_mulXn 2829272
RgX_mul_normalized 428059
RgX_muls 616
RgX_mulspec 12833412
RgX_mulspec_basecase 12158667
RgX_mulspec_basecase_limb 71583809
RgX_neg 1162841
RgX_normalize 1456
RgX_pseudodivrem 45284
RgX_pseudorem 68515
RgX_recip 60928
RgX_recip_shallow 449365
RgX_recipspec_shallow 287670
RgX_renormalize_lg 653296
RgX_rescale 1099
RgX_rotate_shallow 315777
RgX_shift 3393144
RgX_shift_shallow 55595985
RgX_splitting 40642
RgX_sqr 282006
RgX_sqrspec 283616
RgX_sqrspec_basecase 282811
RgX_sqrspec_basecase_limb 2929686
RgX_sub 9645801
RgX_to_RgC 3378796
RgX_translate 1008747
RgX_unscale 3353
RgX_val 2316767
RgX_valrem 41275309
RgX_valrem_inexact 3054
RgXnV_red_shallow 336
RgXn_eval 1561
RgXn_exp 203
RgXn_inv 896
RgXn_mul 3611367
RgXn_mul_basecase 3146777
RgXn_powers 336
RgXn_powu 0
RgXn_powu_i 1505
RgXn_red_shallow 7856
RgXn_reverse 84
RgXn_sqr 2380
RgXn_sqr_basecase 665
RgXspec_kill0 30894329
Rg_RgX_sub 308804
Rg_to_RgC 25809
ZXQX_dvd 1099
ZX_translate 44669
ZX_unscale 7965
ZX_unscale2n 9682
ZX_unscale_div 161
_add 69636
_cmul 114737
_gen_add 20247973
_gen_cmul 31787
_gen_mul 541067
_gen_nored 537533
_gen_one 547767
_gen_sqr 173833
_gen_sub 0
_gen_zero 168
_mul 94306
_mulXn 1176
_one 106078
_oneXn 1407
_red 72751
_sqr 220785
_sqrXn 1785
_sub 0
_zero 105
_zeroXn 0
addmulXn 1864589
addmulXncopy 587878
addpol 2817713
addpolcopy 294696
addshiftpol 112182
brent_kung_optpow 1948274
do_QXQ_eval 819
gen_RgXQ_eval_powers 8741401
gen_bkeval 1031498
gen_bkeval_powers 5420571
get_Rg_algebra 70998
rem 938299

Generated by: LCOV version 1.11