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 - FF.c (source / functions) Hit Total Coverage
Test: PARI/GP v2.18.1 lcov report (development 30074-db9b3c0519) Lines: 1349 1491 90.5 %
Date: 2025-03-13 08:38:27 Functions: 141 152 92.8 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
F3x_equalm1 0
FFX_add 0
FFX_halfgcd 0
FFX_nbroots 0
FF_to_F2xq_i 0
FF_to_Flxq_i 0
Fp_cmp_1 0
FqX_to_FFX 0
RgC_is_FFC 0
RgM_is_FFM 0
Rg_is_FF 0
FFXQ_sqr 6
FFX_ddf 6
FFX_factor_squarefree 6
FF_issquare 6
FFV_roots_to_pol 12
FFXQ_inv 12
FF_ellcard_SEA 12
FFM_indexrank 18
FFX_extgcd 18
FFX_halfgcd_all 18
FFX_resultant 18
gc_gcdext 18
raw_to_FFXM 18
FF_charpoly 24
FF_conjvec 24
FF_norm 24
FF_order 24
FF_trace 24
FFM_suppl 30
FFX_disc 30
fforder 30
FFM_FFC_gauss 36
FF_Frobenius 36
FF_equalm1 36
FFM_image 42
raw_to_FFXC 42
FFM_gauss 48
FF_p 48
FFM_FFC_invimage 54
FFM_det 54
FFM_ker 54
FFM_rank 60
FFXQ_minpoly 66
FFM_deplin 72
FF_var 72
FFM_FFC_mul 78
FF_elllog 78
FF_elltatepairing 84
FFM_invimage 90
FFXQ_mul 90
FF_elldata 102
FFX_degfact 108
FF_pow 109
FFM_inv 126
FF_minpoly 132
FFX_ispower 144
FFX_preimagerel 144
FF_issquareall 162
FF_log 162
fflog 162
FFM_FFC_wrap 168
FF_ispower 180
FFM_wrap 252
FF_f 318
FF_primroot 348
ffprimroot 348
FFX_factor 378
raw_to_FFX_fact 384
FqM_to_FpXQM 410
Z_FF_div 426
FFX_rem 492
FF_sqrtn 546
FF_gen 660
FFX_preimage 828
FFX_preimage_i 882
FF_Q_add 1146
FqM_to_FFM 1470
FpXQ_ell_to_a4a6 1480
FF_ellorder 1512
FF_map 1530
FqV_to_FpXQV 1635
FFX_sqr 2142
FFX_zero 2159
FFX_gcd 2220
FF_Z_Z_muldiv 2748
ffgen 2844
FqC_to_FpXQC 2987
FqC_to_FFC 3198
FFM_mul 3852
FFM_FFM_wrap 3990
raw_to_FFM 4140
FF_ellweilpairing 4284
FF_zero 5165
FF_sqrt 6138
Tp_to_FF 6906
p_to_FF 8184
FFM_to_raw 8514
FF_inv 11916
FF_ellgens 15528
to_FFE_vec 15528
FF_to_FpXQ 17797
FF_1 18390
FF_equal1 20952
FF_ellgroup 22386
FF_elltwist 23304
F3xq_ell_to_a4a6 26964
FFC_to_raw 37890
F2xq_ell_to_a4a6 39066
FF_equal 55272
Flxq_ell_to_a4a6 63230
FF_q 70014
FF_neg 70459
FF_neg_i 72462
FF_ellcard 88482
FFX_roots 88860
FFX_mul 90142
FFX_wrap2 92872
raw_to_FFX 94859
FF_ellinit 103674
raw_to_FFC 106614
Fq_to_FF 123060
FF_mod 142950
FF_to_FpXQ_i 147636
ffrandom 158154
FF_mul2n 186252
FF_sub 205968
FF_ellrandom 210558
FF_div 210678
FF_ellmul 213492
FFX_to_raw 278810
Z_to_raw 369936
to_FFE 441696
rawFq_to_FF 572960
FF_to_Flxq 626573
FF_to_F2xq 785334
FF_Z_add 1169652
FF_Z_mul 1847334
Rg_to_raw 1900788
FF_p_i 2264202
FF_sqr 2542278
mkFF_i 2695328
_mkFF_i 2890850
FF_equal0 7752335
FF_add 11257094
FF_mul 11737137
_checkFF 23411039
FF_samechar 26476885
FF_samefield 26476885
_mkFF 29433510
_initFF 29634852
_getFF 30944032

Generated by: LCOV version 1.16