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.2 lcov report (development 29115-f22e516b23) Lines: 524 558 93.9 %
Date: 2024-03-29 08:06:26 Functions: 71 76 93.4 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
core2fa 0
core2partial 0
corefa 0
corepartial 0
fuse_Z_factor 0
is_nf_extfactor 14
coredisc0 56
corediscs 56
boundfact 70
coredisc2 84
divisorsu_fact_factored 350
check_arith_pos 602
numdiv_aux 760
divisors0 784
numdivu 815
omegau 815
bigomegau 828
sumdiv_aux 1474
fa_clean_u 1498
sumdivk_aux 1506
bigomega 1589
numdiv 1589
omega 1589
cmpu1 1701
Z_issquarefree 2214
Z_issquarefree_fact 2814
uissquarefree_fact 2863
sumdiv 3017
core0 3101
coredisc 6101
_mod4 6185
issquarefree 6412
coredisc2u_fact 7067
factor_pn_1 7455
factor_pn_1_limit 7455
sumdivk 7987
usumdivk_fact 9372
divisors_factored 12124
divisorsu_moebius 12796
is_Z_factornon0 14476
cmpi1 15918
set_fact 16226
factorlim 16401
euler_sumdiv 18168
Z_lsmoothen 19191
RgV_is_ZVnon0 22679
fa_clean 23247
clean_Z_factor 24052
usumdiv_fact 34352
core2 54220
core2_i 54304
u_euler_sumdiv 55598
arith_n 56292
Z_smoothen 81989
coredisc2_fact 129816
factoru_pow 146603
eulerphi 146622
divisorsu 157576
eulerphiu 221344
is_nf_factor 258653
RgV_is_prV 299522
set_fact_check 362313
divisors 366373
divisors_init 378546
ndiv 378826
eulerphiu_fact 630010
RgV_is_ZV0 705932
is_Z_factor 705936
uissquarefree 2450681
check_arith_non0 2620833
check_arith_all 2887961
is_Z_factorpos 7395162
is_Z_factor_i 8115566
RgV_is_ZVpos 15557396
divisorsu_fact 18415903
numdivu_fact 18438539

Generated by: LCOV version 1.14