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 - ifactor1.c (source / functions) Hit Total Coverage
Test: PARI/GP v2.16.2 lcov report (development 29115-f22e516b23) Lines: 1555 1897 82.0 %
Date: 2024-05-01 08:07:45 Functions: 93 107 86.9 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
COPY 0
ECM_alloc 71
ECM_init 71
ECM_loop 114
FpE_add_i 8397084
INIT 50563
SHALLOWCOPY 0
STORE 1427487
STOREi 61653
STOREu 1365686
ZV_aff 28044
Z_ECM 0
Z_factor 9520583
Z_factor_limit 20369
Z_factor_until 98
Z_issmooth 0
Z_issmooth_fact 198109
Z_pollardbrent 0
absZ_factor 3506968
absZ_factor_limit 290461
absZ_factor_limit_strict 888366
aux_end 275099
check_res 4060754
core 706790
coreu 59573
coreu_fact 59573
ecm_elladd 246226
ecm_elladd0 252408
ecm_elladd2 7474
elldouble 42656
ellfacteur 946
ellmult 27351
factorint 10290
factoru 3776435
factoru_sign 32076381
get_rule 218303
ifac_GC 0
ifac_check 0
ifac_checkprime 10671
ifac_core 311
ifac_crack 5542
ifac_decomp 2643
ifac_defrag 224
ifac_delete 44652
ifac_divide 9877
ifac_factor_dbg 0
ifac_factoru 993
ifac_find 15913
ifac_insert_multiplet 1082
ifac_ispowerful 7
ifac_isprime 30298
ifac_main 14959
ifac_moebius 211
ifac_moebiusu 1074
ifac_next 7194
ifac_print 0
ifac_read 658
ifac_realloc 0
ifac_resort 112
ifac_skip 296
ifac_sort_one 112
ifac_start 1911
ifac_start_hint 5547
ifac_whoiswho 5647
ifactor 9551267
ifactor_sign 14477641
is_357_power 2793892
is_kth_power 487305
is_pth_power 69539
ispowerful 1708
matsmalltrunc_append 96457467
matsmalltrunc_init 37808333
maxomegaoddu 2285
maxomegau 59531
moebius 54348
moebiusu 2505292
moebiusu_fact 54173
nextprime 126839
one_iter 32836904
pollardbrent 4815
pollardbrent_i 4815
precprime 49
radicalu 0
rho_dbg 0
snextpr 4634168
special_primes 39264
squfof 3152
squfof_ambig 2843
tridiv_bound 1007208
tridiv_boundu 28267980
u_forprime_next_fast 235922464
uis_357_power 2456116
uis_357_powermod 2510896
uis_357_powermod_32bit_1 14110
uis_357_powermod_32bit_2 813
uisprime_nosmall 52208
unextprime 1253615
unextprime_overflow 1241603
update_pow 950
uprecprime 32
vecfactoroddu 0
vecfactoroddu_i 2285
vecfactorsquarefreeu 7014
vecfactorsquarefreeu_coprime 20531
vecfactoru 0
vecfactoru_i 31911
vecsquarefreeu 49

Generated by: LCOV version 1.14