aboutsummaryrefslogtreecommitdiffstats
path: root/tests/r_resize_inode
diff options
context:
space:
mode:
authorAndreas Dilger <adilger@whamcloud.com>2012-05-28 16:58:24 -0600
committerTheodore Ts'o <tytso@mit.edu>2012-05-29 08:41:26 -0400
commitf3331df6bb5d380efd72e07fc9b40c998b355412 (patch)
tree0749c4d2caf89f4eb5f1e0916d2eefea35302c64 /tests/r_resize_inode
parent182acd17bef0cf8dcb66568448a528abb1dfcd71 (diff)
downloadandroid_external_e2fsprogs-f3331df6bb5d380efd72e07fc9b40c998b355412.tar.gz
android_external_e2fsprogs-f3331df6bb5d380efd72e07fc9b40c998b355412.tar.bz2
android_external_e2fsprogs-f3331df6bb5d380efd72e07fc9b40c998b355412.zip
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>
Diffstat (limited to 'tests/r_resize_inode')
-rw-r--r--tests/r_resize_inode/script13
1 files changed, 6 insertions, 7 deletions
diff --git a/tests/r_resize_inode/script b/tests/r_resize_inode/script
index c8db1279..da3c2ede 100644
--- a/tests/r_resize_inode/script
+++ b/tests/r_resize_inode/script
@@ -3,7 +3,7 @@ if test -x $RESIZE2FS_EXE; then
FSCK_OPT=-yf
OUT=$test_name.log
if [ -f $test_dir/expect.gz ]; then
- EXP=tmp_expect
+ EXP=$test_name.tmp
gunzip < $test_dir/expect.gz > $EXP1
else
EXP=$test_dir/expect
@@ -83,22 +83,21 @@ $TUNE2FS -c 20 -U clear $TMPFILE >/dev/null 2>&1
echo dumpe2fs test.img >> $OUT
$DUMPE2FS $TMPFILE 2>&1 | sed -f $cmd_dir/filter_dumpe2fs >> $OUT
-rm -f $test_name.ok $test_name.failed $TMPFILE
+rm -f $TMPFILE
cmp -s $OUT $EXP
status=$?
if [ "$status" = 0 ] ; then
- echo "ok"
+ echo "$test_name: $test_description: ok"
touch $test_name.ok
else
- echo "failed"
+ echo "$test_name: $test_description: failed"
diff $DIFF_OPTS $EXP $OUT > $test_name.failed
- rm -f tmp_expect
+ rm -f $test_name.tmp
fi
unset IMAGE FSCK_OPT OUT EXP
else #if test -x $RESIZE2FS; then
- rm -f $test_name.ok $test_name.failed
- echo "skipped"
+ echo "$test_name: $test_description: skipped"
fi