Whamcloud - gitweb
tests: use make rules to run tests in parallel
authorAndreas Dilger <adilger@whamcloud.com>
Wed, 23 May 2012 21:05:21 +0000 (15:05 -0600)
committerAndreas Dilger <adilger@whamcloud.com>
Thu, 9 Aug 2012 06:54:46 +0000 (00:54 -0600)
commit6975460925c697030643a3f27a059d59d5400582
treeb68ac78e44cb4ae3073296e7f7544a5d3cae5b63
parent838fe0a8bee2ba281d7e51b731bff325c458a2a1
tests: use make rules to run tests in parallel

Change the e2fsck/mke2fs/tune2fs/e2image/debugfs regression tests
to be driven by Makefile rules instead of by a script loop.  This
allows the tests to be run in parallel like a build and reduces
testing time significantly.

One major change to the tests themselves is to printing the test
name, description, and status together after the test has passed
or failed, to avoid mixing lines from the tests.  The other major
change is to use unique filenames for each test, which was mostly
handled already via b4db1e4c7461a50e18c9fd135b9f1ba6f27e4390, but
in some cases temporary files are changed to use $test_name.tmp to
avoid any collision between running tests.

On my old 2-CPU system it reduced the testing time from 160s to 40s.
Most of the savings is running the MMP test delays going in parallel,
but it still takes the length of the slowest test, f_mmp_garbage.
There will be ongoing benefit in the future as more tests are added
since the wallclock time will not substantially increase.

Tests were run with "make -j", "make -j4", "make -j12", "make -j16",
and "make -j24" repeatedly without any test failures.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
39 files changed:
.gitignore
tests/Makefile.in
tests/d_loaddump/expect
tests/d_loaddump/script
tests/defaults/e_script
tests/e_brel_bma/script
tests/e_icount_normal/name
tests/e_irel_ima/script
tests/f_dup4/script
tests/f_dup_de/script
tests/f_dup_resize/script
tests/f_ext_journal/name [new file with mode: 0644]
tests/f_h_badnode/script
tests/f_h_badroot/script
tests/f_h_normal/script
tests/f_h_reindex/script
tests/f_h_unsigned/script
tests/f_imagic_fs/script
tests/f_mmp/script
tests/f_mmp_garbage/script
tests/f_rehash_dir/name [new file with mode: 0644]
tests/f_resize_inode/script
tests/f_uninit_last_uninit/script
tests/f_unused_itable/name
tests/i_e2image/script
tests/m_mkfs_overhead/script
tests/m_mmp/script
tests/r_inline_xattr/script
tests/r_move_itable/script
tests/r_resize_inode/script
tests/run_e2fsck
tests/t_ext_jnl_rm/script
tests/t_mmp_1on/script
tests/t_mmp_2off/script
tests/test_one.in [new file with mode: 0644]
tests/test_post [new file with mode: 0755]
tests/test_script.in
tests/u_mke2fs/script
tests/u_tune2fs/script