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 - QX_factor.c (source / functions) Coverage Total Hit
Test: PARI/GP v2.18.1 lcov report (development 31042-0fbe168e69) Lines: 95.9 % 952 913
Test Date: 2026-07-23 17:04:59 Functions: 95.3 % 64 61
Legend: Lines:     hit not hit

Function Name Sort by function name Hit count Sort by function hit count
BD 2366
BD_deg1 0
BD_odd 420
Beauzamy_bound 62422
DDF_roots 1878474
LLL_check_progress 1694
LLL_cmbf 147
Mignotte_bound 62422
QX_factor 805
QX_gcd 19369
QXk_gcd 189
Rg_is_QXk 0
ZX_DDF 155284
ZX_DDF_max 210255
ZX_divides 6557254
ZX_divides_i 6587888
ZX_factor 38757
ZX_factor_i 39562
ZX_gcd 10623726
ZX_gcd_Flx 3368482
ZX_gcd_all 14446712
ZX_gcd_chinese 116602
ZX_gcd_filter 122807
ZX_gcd_slice 3356781
ZX_gcd_worker 3356781
ZX_is_irred 103076
ZX_is_squarefree 199470
ZX_radical 3170482
ZX_squff 322307
ZXkX_ZXk_divexact 2527823
ZXkX_ZXk_divexact_s 2570537
ZXkX_ZXk_divides_s 3262477
ZXk_center2n 4909872
ZXk_content_shallow 3444534
ZXk_divexact 0
ZXk_divexact_i 2529108
ZXk_divexact_s 7582948
ZXk_divides 6217701
ZXk_divides_i 2789701
ZXk_divides_s 10118541
ZXk_gcd 1686049
ZXk_gcd_i 8688143
ZXk_renormalize 4958257
_gcd 19558
centeri2n 3214092
chk_factors 140
chk_factors_get 350
cmbf 51730
cmbf_precs 51730
combine_factors 51730
dividesii 3479688
fact_from_DDF 39555
factor_bound 62422
invphi 19659
myconcat 2317
next2pow 14
nfrootsQ 1878474
pick_prime 2088729
polcyclofactors 322
poliscyclo 99218
poliscycloprod 1029
rec 1714007
root_bound 112919
shifteval 186381

Generated by: LCOV version 2.0-1