Improving the situation around check, xcheck and developer testing.

Carlos O'Donell carlos@redhat.com
Fri Sep 20 16:23:25 GMT 2024


The xcheck target is unique to glibc, and has the following deficiencies:

 * Not documented in the GNU Coding Standards or Maintainers Guide.

 * Not documented anywhere the glibc manual.

 * Individual tests have varying critical requirements that are not documented
   except here:
   https://sourceware.org/glibc/wiki/Testing/Tests

 * Developers don't run it.

 * Distributions don't run it.

All of these deficiencies stack up to produce a kind of poorly maintained
target that only senior developers really know about, and that doesn't get
fixed because it doesn't impact day-to-day developer workflows. Since the
target isn't a "normal" target it never gets executed by downstream
distributions.

That we know there are cleanups that need to be made is exactly the
reason I'd like to see 'make xcheck' merged into 'make check', or at the 
very least new tests added to *both* targets.

Let me sketch a suggestion for us to discuss:

 * Add a quickcheck target for developers, put it in the manual in install.texi

   - The quickcheck target runs ALL the tests but sets SCALE_CHECK=1 env var,
     valid values are 1-100.

 * Default quickcheck and check to be the same.

   - By default today quickcheck and check would be the same but we could
     change that.

 * Default xcheck to run with SCALE_CHECK=100 env var.

 * Add your xcheck test to check *and* xcheck.

   - Tune the test to run as short as possible with SCALE_CHECK=1, and as long
     as required with SCALE_CHECK=100.

Outcomes:

 * There are no tests we don't run.

   - Provides compile-time and run-time coverage for all tests.

 * Design some tests to have coverage as a sliding scale.

   - Coverage can be a function of distribution choices.

   - The math library testing could be scale sensitive too.

 * Developers wanting quicker local testing use 'make test t=test' (already present)
   or 'make quickcheck' for local iterative testing.

Future work:

 * Migrate each xcheck to check and add a sliding scale with SCALE_CHECK.

   - Tests that need permissions go into containers.

   - Tests that are destructive go into containers (postclean).

   - Tests that need specific configurations go into containers.

   - Tests that can't be scaled up or down become UNSUPPORTED.

-- 
Cheers,
Carlos.



More information about the Libc-alpha mailing list