Commit Graph

7 Commits (6e4fa6e28151a3bffea2d73c22ea3b7f2338f0fd)

Author SHA1 Message Date
Andreas Dilger f9fd342e56 tests: clean up sed filtering of test output
The sed filters for test outputs that are used to remove build and
test specific information (such as version strings, dates, times,
UUIDs) were unconditionally deleting the first line of output.  This
would normally contain the tool version string, but in some cases
contained other information that was being lost.  This can lead to
difficulty debugging test failures.

The sed filtering has been changed to only remove the actual version
strings.  As well, similar filter strings were duplicated throughout
many scripts, and "sed" and "tr" were often called multiple times in
a pipeline.  These have been consolidated into a single filter.sed
file to avoid having to maintain these filters in multiple places.

In a few cases, accidentally deleted messages have been restored to
the expect output for the tests.  In other cases, trivial whitespace
has been changed in the expect files.

Signed-off-by: Andreas Dilger <adilger@dilger.ca>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2013-06-15 18:44:09 -04:00
Lukas Czerner d2bfdc7ff1 e2fsprogs: Use punch hole as "discard" on regular files
If e2fsprogs tools (mke2fs, e2fsck) is run on regular file instead of
on block device, we can use punch hole instead of regular discard
command which would not work on regular file anyway. This gives us
several advantages. First of all when e2fsck is run with '-E discard'
parameter it will punch out all ununsed space from the image, hence
trimming down the file system image. And secondly, when creating an
file system on regular file (with '-E discard' which is default), we
can use punch hole to clear the file content, hence we can skip inode
table initialization, because reads from sparse area returns zeros. This
will result in faster file system creation (without the need to specify
lazy_itable_init) and smaller images.

This commit also fixes some tests that would fail due to mke2fs showing
discard progress, hence the output would differ.

Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2011-09-15 23:49:20 -04:00
Theodore Ts'o 906a1cf9b6 tests: skip tests that require debugfs if debugfs has not been built
Avoid lots of tests failing if e2fsprogs is compiled with
--disable-debugfs.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2011-09-03 10:04:37 -04:00
Theodore Ts'o 4764a579b4 Fix mke2fs tests to avoid needing any significant ^M (CR) characters
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2007-07-22 16:36:51 -04:00
Theodore Ts'o 484ae818e4 r_resize_inode, m_dasd_bs, m_large_file, m_meta_bg, m_no_opt,
m_read_opt, m_std, run_mke2fs, filter_dumpe2fs: Make tests
portable so they pass correctly on a FreeBSD system.
2005-01-19 18:06:45 -05:00
Theodore Ts'o 89e9fc4d3c m_meta_bg: New test case to test the meta block group feature.
m_raid_opt: New test case to test raid striping

m_large_file: Fix description

run_e2fsck, run_mke2fs, filter_dumpe2fs: Add dumpe2fs output to
	the test output for comparison.  Add support for
	compressed expect scripts.
2003-09-03 09:51:52 -04:00
Theodore Ts'o 1cca86f5d8 Add regression tests for mke2fs.
Mke2fs has been modified to honor the MKE2FS_SKIP_PROGRESS, 
MKE2FS_DEVICE_SECTSIZE, and MKE2FS_SKIP_CHECK_MSG in order 
facilitate the regression testing.
2003-09-01 09:28:18 -04:00