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.18.0 lcov report (development 29712-7c8a932571) Lines: 524 558 93.9 %
Date: 2024-11-15 09:08:45 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 707650
RgV_is_ZVnon0 22868
RgV_is_ZVpos 15636385
RgV_is_prV 302927
Z_issquarefree 2214
Z_issquarefree_fact 2814
Z_lsmoothen 19302
Z_smoothen 82160
_mod4 8554
arith_n 58050
bigomega 1589
bigomegau 835
boundfact 84
check_arith_all 2898552
check_arith_non0 2622057
check_arith_pos 630
clean_Z_factor 26376
cmpi1 16646
cmpu1 1701
core0 3101
core2 53682
core2_i 53766
core2fa 0
core2partial 0
coredisc 8470
coredisc0 56
coredisc2 84
coredisc2_fact 129815
coredisc2u_fact 7137
corediscs 56
corefa 0
corepartial 0
divisors 366401
divisors0 784
divisors_factored 12453
divisors_init 378903
divisorsu 161771
divisorsu_fact 18647744
divisorsu_fact_factored 350
divisorsu_moebius 13034
euler_sumdiv 18168
eulerphi 150906
eulerphiu 223696
eulerphiu_fact 634784
fa_clean 24171
fa_clean_u 1498
factor_pn_1 7476
factor_pn_1_limit 7476
factorlim 16443
factoru_pow 141220
fuse_Z_factor 0
is_Z_factor 707654
is_Z_factor_i 8152705
is_Z_factornon0 14462
is_Z_factorpos 7430588
is_nf_extfactor 14
is_nf_factor 260941
issquarefree 6454
ndiv 379183
numdiv 1589
numdiv_aux 760
numdivu 815
numdivu_fact 18644413
omega 1589
omegau 815
set_fact 16247
set_fact_check 362649
sumdiv 3017
sumdiv_aux 1474
sumdivk 7987
sumdivk_aux 1506
u_euler_sumdiv 55598
uissquarefree 2460190
uissquarefree_fact 2919
usumdiv_fact 34352
usumdivk_fact 9372

Generated by: LCOV version 1.16