Commit Graph

6 Commits (master)

Author SHA1 Message Date
Theodore Ts'o 358c94ab33 tests: fix left-over e2fsprogs-tmp files not getting clean up
In addition, incorporate the test name into the e2fsprogs-tmp to make
it easier to debug left-over temp files in the future.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2014-07-04 16:39:49 -04:00
Andreas Dilger 12f48b0caa tests: kill debugfs on interrupted MMP test
If the f_mmp test is interrupted during its test run, then it can
leave debugfs busy-looping in the background.  Since f_mmp is a
relatively long-running test, and is likely to be running during
a parallel test run, this can happen fairly often.

Set a signal trap for the f_mmp test script being killed, so that
the background debugfs command will always be killed by the test.

Signed-off-by: Andreas Dilger <adilger@dilger.ca>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2012-09-16 22:05:21 -04:00
Andreas Dilger f3331df6bb 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 b4db1e4c74, 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>
2012-05-29 08:41:26 -04:00
Matthias Andree 21af16f404 Fix bashisms
These break the self-test suite on *BSD, and on some Linux distros
where /bin/sh is not implemented by bash.

Signed-off-by: Matthias Andree <matthias.andree@gmx.de>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2012-05-11 22:13:21 -04:00
Eric Sandeen 6d26887991 tests: fix mmp tests on hard 4k devices
Several of the mmp tests were failing on an s390 guest because
direct IO cannot be done on sub-sector sizes, and they were
doing 1k IOs to files on a 4k logical/physical device.

A few tests could just be changed to 4k, but others
needed fixed up output as well.

With this I have all tests passing on s390 again.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2011-11-11 21:11:43 -05:00
Andreas Dilger d9c60e04b3 e2fsck: regression tests for INCOMPAT_MMP feature
Add tests for the MMP feature - creating a filesystem with mke2fs
and MMP enabled, enable/disable MMP with tune2fs, disabling the
e2fsck MMP flag with tune2fs after a failed e2fsck, and e2fsck
checking and fixing a corrupt MMP block.

The MMP tests need to be run from a real disk, not tmpfs, because
tmpfs doesn't support O_DIRECT reads, which MMP uses to ensure
that reads from the MMP block are not filled from the page cache.
Using a local disk does not slow down the tests noticably, since
they wait to detect if the MMP block is being modified.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2011-09-25 01:55:28 -04:00