Whamcloud - gitweb
tests: use make rules to run tests in parallel
authorAndreas Dilger <adilger@whamcloud.com>
Mon, 28 May 2012 22:58:24 +0000 (16:58 -0600)
committerTheodore Ts'o <tytso@mit.edu>
Tue, 29 May 2012 12:41:26 +0000 (08:41 -0400)
commitf3331df6bb5d380efd72e07fc9b40c998b355412
tree0749c4d2caf89f4eb5f1e0916d2eefea35302c64
parent182acd17bef0cf8dcb66568448a528abb1dfcd71
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 temporary 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.
Much of the savings is from the MMP test delays running in parallel.
It still takes the time of the slowest test, f_mmp_garbage, though
there will be ongoing benefit in the future as more tests are added
since the wallclock time will not increase linearly for each test.

Tests were run with various combinations of "make -j", and "make -j2"
through "make -j44" repeatedly without any test failures.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
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