The filter tests have made the build matrix slower (especially with
Valgrind), and several CI environments have more than one CPU core
available, so implement an option to run more than one tester thread
(thus more than one timeout/Valgrind/filtertest/diff process) at a time.
Add a new TESTRUN_JOBS environment variable. Spell the difference
between test blocks and tests. Rename the temporary directory for
clarity and include a prefix returned by a function into all temporary
file names.
Refactor the existing two main loops, which do pretty much everything in
a single thread. Instead use two single-threaded loops to validate two
heterogenous input data structures and to produce a homogenous sequence
of ready-to-run tests, and another single-threaded loop to collect and
to report the results. Have a test-to-result conversion subroutine for
each of the test types (skip/accept/reject) and store a reference to the
required subroutine in each ready-to-run test.
This way only the temporary prefix, the number of jobs setup, starting
of the tests and production of the next result remain specific to
whether Perl has threads support (most platforms) or not (OpenBSD).
Arrange a Perl module for each of these two cases and require one that
is appropriate for the Perl build.
Make use of uninitialized variables a fatal error. Add a sanity check
for the totals at the end. When running multi-threaded, add output
buffering fixups to make the progress responsive enough for the usage
(interactive or not). Update various comments. Use the new feature in
the macos-aarch64 Cirrus CI task.