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>
Tue, 29 May 2012 03:13:51 +0000 (21:13 -0600)
commit3faa5229cfc89cd82ed2b981366698cbecd5ee2b
tree0ec8f8f4acd4b754355f59ee933e09ac2a9ea068
parent9729f247b171cbe1da8954e4d19949de84e64091
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