Commit Graph

31 Commits (master)

Author SHA1 Message Date
Theodore Ts'o 726b21b5d2 tests: suppress use of libmagic when running the regression test suite
How libmagic will behave is not necessarily stable across different
operating systems of versions of libmagic (or the magic number
database).  So suppress it to avoid false test failures.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-06-07 12:46:24 -04:00
Darrick J. Wong 3af6837095 tests: test undo file creation in e2fsck/resize2fs/tune2fs/mke2fs
Regression tests to ensure that we can create undo files and roll
things back if need be.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2015-05-05 10:42:19 -04:00
Theodore Ts'o 330cebc0e9 Merge branch 'maint' into next
Conflicts:
	debugfs/debugfs.c
	e2fsck/Makefile.in
	lib/ext2fs/Makefile.in
	tests/test_config
2014-09-11 12:40:43 -04:00
Michael Forney 60abcd7394 tests: Add to LD_LIBRARY_PATH instead of overriding
Signed-off-by: Michael Forney <forney@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2014-09-08 18:55:42 -04:00
Theodore Ts'o d9eab8e2f0 tests/d_inline_dump: remove version dependency in the expected output
Also add the convenience macro $CLEAN_OUTPUT in test_config which can
be used to run the "sed -e $cmd_dir/filter.sed" command to clean up
e2fsprogs command output before comparing with the expected golden
output.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2014-08-25 18:04:42 -04:00
Theodore Ts'o 9974f8c2be tests: make sure MKE2FS_FIRST_META_BG is unset while running tests
If the developer has set the MKE2FS_FIRST_META_BG environment
variable, this can cause test failures.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2014-08-10 16:21:31 -04:00
Theodore Ts'o 42b61c50e5 libext2fs, tests: allow /etc/mtab file to be missing
The environment variable EXT2FS_NO_MTAB_OK will suppress the error
code EXT2_NO_MTAB_FILE when the /etc/mtab file can not be found.  This
allows the e2fsprogs regression test suite to be run in chroots which
might not have an /etc/mtab file.

By default will still want to complain if the /etc/mtab file is
missing, since we really don't want to discourage distributions and
purveyors of embedded systems from running without an /etc/mtab file.
But if it's missing it only results in a missing sanity check that
might cause file system corruption if the file system is mounted when
programs such as e2fsck, tune2fs, or resize2fs is running, so there is
no potential security problems that might result if this environment
variable is set inappropriately.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2013-07-08 12:08:44 -04:00
Theodore Ts'o 28e6662403 tests: create crcsum progam to support resizing tests
The only checksum program which we can reliably count upon being
installed on all systems is "sum", which is not a particular robust
checksum.  The problem with using md5sum or sha1sum is it hat it may
not be installed on all systems.  So create a crcsum program which is
used so we can validate that a data file on a resized file system has
not been corrupted.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2013-03-31 20:41:23 -04:00
Theodore Ts'o c498cb11d3 mke2fs: fix progress suppression to make regression tests reliable
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2012-09-22 21:26:48 -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 f305fd7f0c tests: fix i_e2image so it works with valgrind
Since e2image can be optionally compiled out, we tested to see if
e2image was built; but using "test -x $E2IMAGE" fails if e2image is
something like "valgrind --simhints=lax-ioctls ../misc/e2image".
Define and use $E2IMAGE_EXE, much like we have done with e2undo and
resize2fs.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2011-09-03 10:02:34 -04:00
Theodore Ts'o b4db1e4c74 tests: use /tmp for scratch files
The /tmp directory is often a memory based file system, and using this
can speed up running the regression test suite.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2011-07-09 12:08:10 -04:00
Lukas Czerner 9e713505ab tests: New i_e2image test to validate image creation/conversion
This commit adds new regression test called i_e2image which should
validate expected behaviour of e2image raw and qcow2 image creation
and qcow2 -> raw image conversion. You can run it with "make check" as
the rest of regression tests.

Testing is performed on three filesystem images with different block
sizes (1024, 2048, 4096). It creates raw and qcow2 images from the
original and then convert qcow2 image back to raw image. The results are
checksummed and compared with pre-prepared results. All md5sums should
stay the same and raw image created from original and qcow2 image should
be the same as well (just for the record).

Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2011-05-18 12:19:41 -04:00
Theodore Ts'o 0eeec8ac61 Fix compiling under diet libc
Some recent changes had caused diet libc support to bitrot.  Fix up
missing header files and other portability fixups needed for dietlibc.
(Many of these changes also improve general portability.)

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-09-12 09:10:39 -04:00
Theodore Ts'o 123b880846 Update tests to reflect undoe2fs -> e2undo rename
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-06-07 22:30:22 -04:00
Aneesh Kumar K.V 2ec408ef40 Add test cases for undoe2fs: u_undoe2fs_mke2fs and u_undoe2fs_tune2fs
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-04-27 20:07:50 -04:00
Theodore Ts'o 3d43836fda New mke2fs filesystem and usage types support
Provide mke2fs with a much more sophisticated system for controlling
configuration parameters of a newly created filesystem based on a
split filesystem and usage type system.  The -t option to mke2fs was a
deprecated alias to -c; it now specifies a filesystem type (ext2,
ext3, ext4, etc.), while the -T option can now be a comma separated
usage list.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-04-06 17:15:38 -04:00
Theodore Ts'o 6c9cc58375 Set LC_ALL instead of LANG in the test suite config
LC_ALL is the "high priority" environment variable that overrides all
others, where as LANG is the lowest priorty environment variable.  If
LC_ALL is set, it doesn't matter whether LANG, LANGUAGE, LC_COLLATE,
LC_MESSAGES, and the all the rest are set.  This will assure that the
locale when running the test suites is the "C" locale.

Obviates Gentoo patch: e2fsprogs-1.38-tests-locale.patch

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2007-06-30 19:52:11 -04:00
Theodore Ts'o e54635de96 If diff -u is supported, use it to report test failures.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2006-08-06 14:33:13 -04:00
Theodore Ts'o 0cbd172def Make test scripts more robust against locale-related environment variables
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2006-05-28 23:41:23 -04:00
Theodore Ts'o 9dc6ad1ecb Change mke2fs to use /etc/mke2fs.conf as a configuration file
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2006-03-23 22:00:01 -05:00
Theodore Ts'o 5dd2a6e08d Add E2FSCK_CONFIG environment variable
Also, use this environtment variable to make sure that a local
/etc/e2fsck.conf file will not interfere with the regression test
suite.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2005-12-31 16:21:00 -05:00
Theodore Ts'o cfe7ba4978 Add valgrind support to the regression test suite
Add the --valgrind option to the tests/test_script which allows us to
run the e2fsprogs regression test suite under valgrind.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2005-08-08 19:29:15 -05:00
Theodore Ts'o d82f890355 defaults/e_script, run_e2fsck, d_loaddump, f_resize_inode,
f_swapfs, f_move_itable, f_resize_inode, test_config:
	Allow the diff options to be set in test_config so that
	diff -u can be used on platforms that have it.  (To be
	done: checking whether diff can support -u in the
	configure script.)
2005-06-16 15:08:00 -04:00
Theodore Ts'o f90c9919b4 Add two new tests, f_resize_inode, and r_resize_inode, to the regression
test suite, which tests e2fsck and reszizefs2, respecitvely.
2004-12-24 01:47:50 -05:00
Theodore Ts'o 44b0ec1069 test_config: Define DYLD_LIBRAY_PATH so that "make check" works on
Darwin systems when building with shared libraries.
2003-04-19 14:22:19 -04:00
Theodore Ts'o 521e368572 Many files:
Checked in e2fsprogs 1.08.
1997-04-29 17:48:10 +00:00
Theodore Ts'o 19c78dc07f Many files:
Checked in e2fsprogs-1.07
1997-04-29 16:17:09 +00:00
Theodore Ts'o 5c576477cc Many files:
Checked in e2fsprogs 1.06
1997-04-29 15:29:49 +00:00
Theodore Ts'o 1e3472c5f3 Many files:
Checked in e2fsprogs 1.05
1997-04-29 14:53:37 +00:00
Theodore Ts'o a418d3ad81 Many files:
Checked in e2fsprogs 0.5c
1997-04-26 14:00:26 +00:00