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.1 lcov report (development 28676-df828f1c94) Lines: 1555 1897 82.0 %
Date: 2023-08-26 07:54:43 Functions: 93 107 86.9 %
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
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 7
uprecprime 32
precprime 49
vecsquarefreeu 49
ECM_alloc 71
ECM_init 71
Z_factor_until 98
ifac_resort 112
ifac_sort_one 112
ECM_loop 114
ifac_moebius 211
ifac_defrag 224
ifac_skip 293
ifac_core 308
uis_357_powermod_32bit_2 648
ifac_read 652
update_pow 904
ifac_factoru 1065
ifac_moebiusu 1074
ellfacteur 1084
ifac_insert_multiplet 1220
ispowerful 1708
ifac_start 1901
squfof_ambig 2966
maxomegaoddu 2968
vecfactoroddu_i 2968
ifac_decomp 3335
vecfactorsquarefreeu_coprime 3374
squfof 3413
pollardbrent 5591
pollardbrent_i 5591
ifac_crack 6299
ifac_start_hint 6301
ifac_whoiswho 6404
vecfactorsquarefreeu 7014
ifac_next 7445
ecm_elladd2 7474
factorint 10290
ifac_divide 11508
uis_357_powermod_32bit_1 12148
ifac_checkprime 12289
ifac_main 17354
ifac_find 18299
Z_factor_limit 22435
special_primes 26461
ellmult 27351
ZV_aff 28044
vecfactoru_i 31930
ifac_isprime 34220
maxomegau 42395
elldouble 42656
STOREi 48567
ifac_delete 50804
uisprime_nosmall 52567
moebiusu_fact 54173
moebius 55914
is_pth_power 56222
INIT 57469
coreu 59242
coreu_fact 59242
nextprime 126839
Z_issmooth_fact 197994
get_rule 218303
aux_end 226653
ecm_elladd 246226
ecm_elladd0 252408
absZ_factor_limit 276946
is_kth_power 333487
core 706437
absZ_factor_limit_strict 888033
unextprime_overflow 920578
unextprime 932567
tridiv_bound 972939
STOREu 1384469
STORE 1433057
uis_357_power 2457016
uis_357_powermod 2499802
moebiusu 2511179
is_357_power 2780826
absZ_factor 2885599
factoru 3777342
check_res 4034746
snextpr 4634168
FpE_add_i 8397084
Z_factor 9272136
ifactor 9304906
ifactor_sign 13548772
tridiv_boundu 26818858
factoru_sign 30486401
one_iter 33324672
matsmalltrunc_init 45183946
matsmalltrunc_append 112984143
u_forprime_next_fast 235278885

Generated by: LCOV version 1.14