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 - arith2.c (source / functions) Hit Total Coverage
Test: PARI/GP v2.16.1 lcov report (development 28676-df828f1c94) Lines: 524 558 93.9 %
Date: 2023-08-26 07:54:43 Functions: 71 76 93.4 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
RgV_is_ZV0 705944
RgV_is_ZVnon0 14461
RgV_is_ZVpos 15065302
RgV_is_prV 299534
Z_issquarefree 2214
Z_issquarefree_fact 2814
Z_lsmoothen 20726
Z_smoothen 53493
_mod4 5873
arith_n 56266
bigomega 1589
bigomegau 828
boundfact 70
check_arith_all 2887424
check_arith_non0 2622427
check_arith_pos 595
clean_Z_factor 24051
cmpi1 15918
cmpu1 1701
core0 3101
core2 54194
core2_i 54278
core2fa 0
core2partial 0
coredisc 5789
coredisc0 56
coredisc2 84
coredisc2_fact 129817
coredisc2u_fact 7067
corediscs 56
corefa 0
corepartial 0
divisors 366373
divisors0 784
divisors_factored 12124
divisors_init 378546
divisorsu 158615
divisorsu_fact 26945904
divisorsu_fact_factored 350
divisorsu_moebius 12796
euler_sumdiv 18168
eulerphi 146622
eulerphiu 221309
eulerphiu_fact 627182
fa_clean 23247
fa_clean_u 1498
factor_pn_1 7448
factor_pn_1_limit 7448
factorlim 16387
factoru_pow 146857
fuse_Z_factor 0
is_Z_factor 705935
is_Z_factor_i 7869604
is_Z_factornon0 14468
is_Z_factorpos 7149205
is_nf_extfactor 14
is_nf_factor 258460
issquarefree 6412
ndiv 378826
numdiv 1589
numdiv_aux 760
numdivu 815
numdivu_fact 26884029
omega 1589
omegau 815
set_fact 16226
set_fact_check 362313
sumdiv 3017
sumdiv_aux 1474
sumdivk 7987
sumdivk_aux 1506
u_euler_sumdiv 54954
uissquarefree 2456516
uissquarefree_fact 2863
usumdiv_fact 33848
usumdivk_fact 9372

Generated by: LCOV version 1.14