[lfs-dev] Perl test times

Jonathan Cottrill linuxfromscratch at jonathancottrill.net
Thu Jun 29 15:13:10 PDT 2017

As mentioned in Chapter 6, the Perl tests take quite a bit of time when run 
with "make -k test". The testing framework used by Perl doesn't respect the -j 
option to make, so the tests never run in parallel.

There's another way to run the Perl test suite, using the test_harness make 
target and the TEST_JOBS variable; for example:

TEST_JOBS=8 make test_harness

(I picked 8 in this case based on trial and error and load averages on my 
quad-core system.) On my system, the test time went from 10m6s to 2m24s.

The docs (https://perldoc.perl.org/perlhack.html#Parallel-tests) do point out 
a caveat that could make this less than ideal for LFS builders: There are some 
tests that supposedly become flaky when run in parallel, like dist/IO/t/
io_dir.t. However, I've run the suite several times this way, and have yet to 
see any new failures (the expected Compress-Raw-Zlib and IO-Compress failures 
still occur, of course). dist/IO/t/io_dir.t is always reported as "ok".

A slight oddity of running this way is that the output is a bit different. 
Skipped tests have additional information about why they're skipped, and the 
final report on test failures is more detailed.


More information about the lfs-dev mailing list