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-bordeaux1.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 - FpX.c (source / functions) Hit Total Coverage
Test: PARI/GP v2.8.0 lcov report (development 17403-69c3b04) Lines: 1018 1107 92.0 %
Date: 2015-01-27 Functions: 131 135 97.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 484 624 77.6 %

Function Name Sort by function name Hit count Sort by hit count
FpV_inv 2423
FpV_roots_to_pol 4699
FpXC_FpXQV_eval 112
FpXM_FpXQV_eval 28
FpXM_FpX_mul2 453
FpXM_mul2 151
FpXQM_autsum 14
FpXQM_autsum_mul 28
FpXQM_autsum_sqr 14
FpXQ_autpow 529
FpXQ_autpow_mul 7
FpXQ_autpow_sqr 557
FpXQ_autpowers 532
FpXQ_autsum 913
FpXQ_autsum_mul 1769
FpXQ_autsum_sqr 927
FpXQ_charpoly 2956
FpXQ_conjvec 8
FpXQ_div 256167
FpXQ_inv 324197
FpXQ_invsafe 324697
FpXQ_issquare 2322
FpXQ_log 58501
FpXQ_matrix_pow 6544
FpXQ_minpoly 2955
FpXQ_mul 37925810
FpXQ_norm 1
FpXQ_order 36
FpXQ_pow 273790
FpXQ_pow_Frobenius 15788
FpXQ_powers 95943
FpXQ_powu 52086
FpXQ_red 3138083
FpXQ_sqr 2151068
FpXQ_sqrt 7035
FpXQ_sqrtn 7858
FpXQ_trace 10277
FpXT_red 373263
FpXV_prod 18204
FpXV_red 146696
FpX_FpXM_qmul 147
FpX_FpXQV_eval 51372
FpX_FpXQ_eval 152341
FpX_Fp_add 484086
FpX_Fp_add_shallow 0
FpX_Fp_mul 3182350
FpX_Fp_mul_to_monic 51494
FpX_Fp_mulspec 3183498
FpX_Fp_sub 85916
FpX_Fp_sub_shallow 1528
FpX_Frobenius 71569
FpX_add 4976990
FpX_addmulmul 914
FpX_center 580328
FpX_chinese_coprime 665
FpX_deriv 449072
FpX_digits 3423
FpX_disc 14
FpX_div_by_X_x 18421
FpX_divrem 2877021
FpX_divrem_Barrett_noGC 89170
FpX_divrem_Barrettspec 89572
FpX_divrem_basecase 49313810
FpX_eval 479699
FpX_extgcd 355875
FpX_extgcd_basecase 268570
FpX_extgcd_halfgcd 4
FpX_fromdigits 1449
FpX_gcd 88816
FpX_gcd_basecase 18693
FpX_gcd_check 0
FpX_get_red 126222
FpX_halfgcd 347
FpX_halfgcd_basecase 156
FpX_halfgcd_i 303
FpX_halfgcd_split 147
FpX_halve 875
FpX_invBarrett 1640
FpX_invBarrett_Newton 38
FpX_invBarrett_basecase 1598
FpX_is_squarefree 2149
FpX_matFrobenius 2512
FpX_mul 51242398
FpX_mulspec 330813
FpX_mulu 1056457
FpX_neg 159286
FpX_normalize 241108
FpX_powu 3003
FpX_recipspec 179182
FpX_red 64079373
FpX_rem 49067007
FpX_rescale 13237
FpX_resultant 5035
FpX_sqr 2183471
FpX_sub 13145976
FpX_subspec 13235548
FpX_valrem 23429
Fp_FpXQ_log 37059
Fp_FpX_sub 16458
Fp_issquare 46578
Fp_neg_FpX 14
Fp_red_FpX 555
FqV_inv 0
Fq_issquare 46578
Fq_log 1575
ZX_lgrenormalizespec 179773
Z_to_FpX 870
_FpXQ_add 479105
_FpXQ_cmul 533294
_FpXQ_easylog 839
_FpXQ_mul 304973
_FpXQ_one 126897
_FpXQ_pow 15187
_FpXQ_rand 2313
_FpXQ_red 132297
_FpXQ_sqr 1649575
_FpXQ_zero 16
_FpX_add 4858
_FpX_divrem 36386
_FpX_mul 54727
_FpX_sqr 13328
bounded_order 3876
famat_Z_gcd 0
gener_FpXQ 6511
gener_FpXQ_i 1443
gener_FpXQ_local 1428
get_FpXQ_star 1271
get_FpX_degree 818458
get_FpX_mod 351400
get_FpX_red 51944028
get_FpX_var 757838
matid2_FpXM 4
random_FpX 61067
to_Flx 36744681
to_Flxq 569221

Generated by: LCOV version 1.9