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 17072-bc6ca01) Lines: 1381 1685 82.0 %
Date: 2014-11-17 Functions: 75 84 89.3 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 1043 1519 68.7 %

Function Name Sort by function name Hit count Sort by hit count
COPY 0
FpE_add_i 331520
INIT 35044
SHALLOWCOPY 0
STORE 150144
STOREi 16494
STOREu 133629
ZV_aff 6104
Z_factor 1192765
Z_factor_limit 4872
Z_factor_until 679
Z_issmooth 0
Z_issmooth_fact 269850
absi_factor 470954
absi_factor_limit 9961
alloc_scratch 35
aux_end 30768
check_res 1837244
core 280
coreu 733
ecm_elladd 36925
ecm_elladd0 37457
ecm_elladd2 980
elldouble 7714
ellfacteur 574
ellmult 5166
factorint 14
factoru 495102
factoru_sign 2143558
get_rule 30513
ifac_GC 0
ifac_check 0
ifac_checkprime 7971
ifac_core 19
ifac_crack 3987
ifac_decomp 1110
ifac_defrag 210
ifac_delete 30871
ifac_divide 7096
ifac_factor_dbg 0
ifac_factoru 842
ifac_find 10544
ifac_insert_multiplet 679
ifac_ispowerful 7
ifac_isprime 11544
ifac_main 10466
ifac_moebius 189
ifac_moebiusu 1068
ifac_next 7066
ifac_print 0
ifac_read 60
ifac_realloc 0
ifac_resort 105
ifac_skip 18
ifac_sort_one 105
ifac_start 1822
ifac_start_hint 3774
ifac_whoiswho 4085
ifactor 1198330
ifactor_sign 1679245
is_357_power 1382314
is_kth_power 30345
is_pth_power 28407
ispowerful 294
moebius 1010
moebiusu 12055
nextprime 2032371
pollardbrent 3746
precprime 35
rho_dbg 0
snextpr 235956
special_primes 9855
squfof 2262
squfof_ambig 2262
tridiv_bound 22837
u_forprime_next_fast 340915837
uis_357_power 982596
uis_357_powermod 1016199
uis_357_powermod_32bit_1 8803
uis_357_powermod_32bit_2 423
unextprime 5530634
update_pow 325
uprecprime 25
utridiv_bound 1918418

Generated by: LCOV version 1.9