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 - ifactor1.c (source / functions) Hit Total Coverage
Test: PARI/GP v2.8.0 lcov report (development 17960-0cd23ba) Lines: 1385 1687 82.1 %
Date: 2015-09-02 Functions: 75 84 89.3 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 1054 1521 69.3 %

Function Name Sort by function name Hit count Sort by hit count
COPY 0
FpE_add_i 1667768
INIT 32147
SHALLOWCOPY 0
STORE 153778
STOREi 16907
STOREu 136850
ZV_aff 9749
Z_factor 1972878
Z_factor_limit 9105
Z_factor_until 28
Z_issmooth 0
Z_issmooth_fact 324843
absi_factor 1331708
absi_factor_limit 10528
alloc_scratch 41
aux_end 31535
check_res 1838527
core 3108
coreu 2486
ecm_elladd 70993
ecm_elladd0 72455
ecm_elladd2 2039
elldouble 13456
ellfacteur 335
ellmult 8811
factorint 14
factoru 1179441
factoru_sign 4472140
get_rule 61053
ifac_GC 0
ifac_check 0
ifac_checkprime 7142
ifac_core 19
ifac_crack 3597
ifac_decomp 1156
ifac_defrag 210
ifac_delete 28325
ifac_divide 6656
ifac_factor_dbg 0
ifac_factoru 872
ifac_find 10180
ifac_insert_multiplet 437
ifac_ispowerful 7
ifac_isprime 10142
ifac_main 10102
ifac_moebius 189
ifac_moebiusu 1068
ifac_next 6583
ifac_print 0
ifac_read 60
ifac_realloc 0
ifac_resort 105
ifac_skip 18
ifac_sort_one 105
ifac_start 1395
ifac_start_hint 3423
ifac_whoiswho 3695
ifactor 1982026
ifactor_sign 3324262
is_357_power 1382260
is_kth_power 30560
is_pth_power 28132
ispowerful 1708
moebius 2417
moebiusu 18246
nextprime 2032448
pollardbrent 3328
precprime 35
rho_dbg 0
snextpr 960288
special_primes 10025
squfof 2044
squfof_ambig 2290
tridiv_bound 23047
u_forprime_next_fast 411344615
uis_357_power 983058
uis_357_powermod 1016301
uis_357_powermod_32bit_1 8826
uis_357_powermod_32bit_2 428
unextprime 3018270
update_pow 374
uprecprime 25
utridiv_bound 4207393

Generated by: LCOV version 1.9