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 - qfsolve.c (source / functions) Hit Total Coverage
Test: PARI/GP v2.18.1 lcov report (development 30702-bddb8d6928) Lines: 623 634 98.3 %
Date: 2026-02-23 02:23:56 Functions: 34 34 100.0 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
ZsymM_Z_divexact 14774
ZsymM_Z_divexact_partial 77747
blocks4 1889
both_pm1 16158
check_symmetric 16499
completebasis 340230
det_minors 505
hilberts 5200
id 715
kermodp 238525
partialgaussred 35419
principal_minor 24044
prod_fm 35111
qf_apply_tau 9651
qf_apply_transvect_Z 3009
qfb_factorback 2830
qfbmat 1190
qfbmat2 15
qfbsqrt 1625
qflllgram_indef 35419
qflllgram_indefgoon 7925
qflllgram_indefgoon2 1625
qfminimize 10
qfminimize_fact 12690
qfparam 6203
qfsolve 10286
qfsolve_i 10286
qfsolvemodp 12885
qftriv 35419
quadclass2 1920
symmetric_non0_coeff 10
update_fm 61957
vecextend 95741
witt 1520

Generated by: LCOV version 1.16