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 20443-183d202) Lines: 1279 1395 91.7 %
Date: 2017-03-27 05:17:48 Functions: 140 152 92.1 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
Kronecker_to_mod 135
QXQV_to_mod 770
QXQXV_to_mod 385
QXQX_to_mod 1370
QXQX_to_mod_shallow 59365
QXQ_powers 1025
QXQ_to_mod 291660
QXQ_to_mod_copy 10295
QXV_QXQ_eval 560
QXX_QXQ_eval 45
QX_ZXQV_eval 1250
RgM_to_RgXV 25320
RgM_to_RgXX 10935
RgV_to_RgM 18330
RgV_to_RgX 252615
RgV_to_RgX_reverse 106810
RgXQC_red 0
RgXQM_mul 0
RgXQM_red 0
RgXQV_RgXQ_mul 40
RgXQV_red 40
RgXQX_RgXQ_mul 20
RgXQX_divrem 15125
RgXQX_mul 1185
RgXQX_pseudodivrem 32495
RgXQX_pseudorem 16995
RgXQX_red 3950
RgXQX_sqr 0
RgXQX_translate 4320
RgXQ_matrix_pow 205
RgXQ_minpoly_naive 40
RgXQ_norm 23380
RgXQ_pow 12430
RgXQ_powers 1245
RgXQ_powu 117430
RgXV_RgV_eval 145
RgXV_to_RgM 1295
RgXV_unscale 145
RgXX_to_RgM 15
RgXY_degreex 0
RgXY_swap 160
RgXY_swapspec 8982
RgX_RgV_eval 7195
RgX_RgXQV_eval 0
RgX_RgXQ_eval 30850
RgX_RgXnV_eval 480
RgX_RgXn_eval 0
RgX_Rg_add 7173535
RgX_Rg_add_shallow 1730
RgX_Rg_div 15059405
RgX_Rg_divexact 363760
RgX_Rg_eval_bk 0
RgX_Rg_mul 44263765
RgX_Rg_sub 23055
RgX_add 10667201
RgX_blocks 64195
RgX_deflate 52975
RgX_deriv 125445
RgX_div_by_X_x 22810
RgX_divrem 8584520
RgX_divs 1235
RgX_equal 2844119
RgX_even_odd 16650
RgX_get_0 91505
RgX_get_1 406160
RgX_inflate 76240
RgX_mul 7601430
RgX_mulXn 1917165
RgX_mul_normalized 307935
RgX_mulhigh_i 14075
RgX_muls 440
RgX_mulspec 8605781
RgX_mulspec_basecase 8202348
RgX_mulspec_basecase_limb 49844348
RgX_neg 626490
RgX_normalize 1040
RgX_pseudodivrem 32410
RgX_pseudorem 16995
RgX_recip 360
RgX_recip_shallow 222835
RgX_recipspec_shallow 166768
RgX_renormalize_lg 494790
RgX_rescale 785
RgX_rotate_shallow 225555
RgX_shift 2403520
RgX_shift_shallow 37978254
RgX_splitting 29030
RgX_sqr 174320
RgX_sqrspec 175464
RgX_sqrspec_basecase 174892
RgX_sqrspec_basecase_limb 1480328
RgX_sub 6781099
RgX_to_RgC 2414280
RgX_translate 727635
RgX_unscale 2395
RgX_val 1428160
RgX_valrem 27944810
RgX_valrem_inexact 2325
RgXnV_red_shallow 240
RgXn_eval 1115
RgXn_exp 145
RgXn_inv 70215
RgXn_mul 2613820
RgXn_mul_basecase 2265805
RgXn_mulhigh 14075
RgXn_powers 240
RgXn_powu 0
RgXn_powu_i 1075
RgXn_red_shallow 27225
RgXn_reverse 60
RgXn_sqr 1700
RgXn_sqr_basecase 475
RgXspec_kill0 21111668
Rg_RgX_sub 221395
Rg_to_RgC 90755
ZXQX_dvd 785
ZX_translate 261635
ZX_unscale 10755
ZX_unscale2n 6965
ZX_unscale_div 115
_add 44890
_cmul 76150
_gen_add 14555715
_gen_cmul 22705
_gen_mul 386820
_gen_nored 384150
_gen_one 391460
_gen_sqr 124290
_gen_sub 0
_gen_zero 120
_mul 53660
_mulXn 840
_one 72235
_oneXn 1005
_red 48715
_sqr 130070
_sqrXn 1275
_sub 0
_zero 75
_zeroXn 0
addmulXn 1192770
addmulXncopy 336605
addpol 1751231
addpolcopy 155957
addshiftpol 16270
brent_kung_optpow 1400325
do_QXQ_eval 605
gen_RgXQ_eval_powers 6692230
gen_bkeval 733635
gen_bkeval_powers 4287215
get_Rg_algebra 50700
rem 448085

Generated by: LCOV version 1.11