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.18.1 lcov report (development 30074-db9b3c0519) Lines: 1812 2216 81.8 %
Date: 2025-03-13 08:38:27 Functions: 105 120 87.5 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
COPY 0
SHALLOWCOPY 0
Z_ECM 0
Z_issmooth 0
Z_pollardbrent 0
coreu_fact 0
ifac_GC 0
ifac_check 0
ifac_factor_dbg 0
ifac_print 0
ifac_realloc 0
radicalu 0
rho_dbg 0
vecfactoroddu 0
vecfactoru 0
ifac_ispowerful 6
ifac_resort 6
ifac_sort_one 6
Z_to_Up 12
ifac_defrag 12
uprecprime 32
ECM_alloc 42
ECM_init 42
vecsquarefreeu 42
precprime 48
ECM_loop 66
coreu_init_from_squarefree 207
ifac_moebius 227
ifac_skip 275
core_init_from_squarefree 285
ifac_core 303
ifac_moebiusu 553
pollardbrent_i 625
Zn_ispower 648
ifac_read 652
Zp_ispower 684
ifac_factoru 724
update_pow 743
maxomegaoddu 831
vecfactoroddu_i 831
uis_357_powermod_32bit_2 844
ispowerful 1464
diviiexact_inplace 1618
squfof_ambig 1821
ifac_start 2162
ifac_decomp 2207
Z_factor_until 2610
ellfacteur 2778
ifac_insert_multiplet 2796
pollardbrent 2960
squfof 4378
ifac_crack 4953
ecm_elladd2 4956
ifac_whoiswho 4957
ifac_start_hint 5093
ifac_next 5680
vecfactorsquarefreeu 6012
uisprime_nosmall 6664
ifac_divide 8432
factorint 8820
ifac_checkprime 9656
ifac_main 12175
ifac_find 13102
uis_357_powermod_32bit_1 13941
ZV_aff 17820
ellmult 17820
STOREi 23919
ifac_isprime 24151
vecfactoru_i 27347
elldouble 27786
vecfactorsquarefreeu_coprime 27935
special_primes 30988
ifac_delete 39325
Z_factor_limit 42599
moebius 44301
INIT 44424
moebiusu_fact 46452
coreu 53990
is_pth_power 56107
maxomegau 61360
nextprime 113493
Z_oddprimedivisors_fast 114146
Z_factor_primes 114736
Z_oddprimedivisors_gcd 115348
aux_end 115396
get_rule 144006
Z_issmooth_fact 150612
ecm_elladd 162054
ecm_elladd0 166086
absZ_factor_limit 246573
is_kth_power 369441
core 608195
STOREu 608391
STORE 632441
u_oddprimedivisors_gcd 686480
tridiv_bound 753058
absZ_factor_limit_strict 760538
factoru_primes 783241
unextprime_overflow 806449
unextprime 923945
uis_357_power 2028294
uis_357_powermod 2071242
moebiusu 2205802
is_357_power 2398488
absZ_factor 2810172
snextpr 3056178
factoru 3214021
check_res 3362620
tridiv_boundu 3743800
FpE_add_i 5579856
Z_factor 8146082
ifactor 8197489
ifactor_sign 12017328
u_357_divides 13588470
factoru_result 14745076
factoru_sign 15115953
one_iter 19941935
matsmalltrunc_init 23441948
matsmalltrunc_append 62008806
u_forprime_next_fast 123269126

Generated by: LCOV version 1.16