e2fsprogs/tests
Eric Whitney d45170717a tests: add another test for uninit extents past eof
Commit d3f32c2db8 was intended to detect extents found outside their
proper location in the extent tree, including invalid extents at the
end of an extent block.  However, it incorrectly reported legal
uninitialized extents created by fallocate() at the end of file with
the FALLOC_FL_KEEP_SIZE flag as false positives.  xfstests
generic/263 (among others) caught this problem, while the e2fsprogs
test f_uninit_ext_past_eof did not.  The latter test failed to
detect the problem in part because it uses a test file whose i_size
is 0.

Add a test derived from the fsx-based test case in xfstests
generic/263 consisting of a file with non-zero length, more than
four extents total, and two uninitialized extents past EOF to
reliably reproduce commit d3f32c2db8's false positive behavior.

Signed-off-by: Eric Whitney <enwlinux@gmail.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2013-09-26 20:17:09 -04:00
..
d_loaddump tests: clean up sed filtering of test output 2013-06-15 18:44:09 -04:00
d_special_files tests: clean up sed filtering of test output 2013-06-15 18:44:09 -04:00
defaults tests: use make rules to run tests in parallel 2012-05-29 08:41:26 -04:00
e_brel_bma tests: use make rules to run tests in parallel 2012-05-29 08:41:26 -04:00
e_icount_normal tests: use make rules to run tests in parallel 2012-05-29 08:41:26 -04:00
e_icount_opt Many files: 1997-04-29 17:48:10 +00:00
e_irel_ima tests: use make rules to run tests in parallel 2012-05-29 08:41:26 -04:00
f_8192_block Do sanity checking of the number of blocks and inodes in a group for 2002-06-10 11:05:56 -06:00
f_16384_block Do sanity checking of the number of blocks and inodes in a group for 2002-06-10 11:05:56 -06:00
f_bad_disconnected_inode e2fsck: remove EXT4_EOFBLOCKS_FL flag handling 2012-03-22 19:42:11 -04:00
f_bad_local_jnl Add support for backing up the journal inode location in the 2003-08-21 00:40:26 -04:00
f_badbblocks e2fsck: Interpret negative blkcount in file system problem reports 2009-10-04 18:02:24 -04:00
f_baddir e2fsck: fix mysterious "FILE SYSTEM WAS MODIFIED" with no changes 2011-06-16 01:22:02 -04:00
f_baddir2 e2fsck: Interpret negative blkcount in file system problem reports 2009-10-04 18:02:24 -04:00
f_baddotdir Many files: 1997-10-03 17:48:10 +00:00
f_badinode On-disk format definition for huge files 2006-11-11 06:32:03 -05:00
f_badjour_indblks e2fsck: Remove "ext3" from problem descriptions of the journal 2009-01-01 23:10:40 -05:00
f_badjourblks e2fsck: Remove "ext3" from problem descriptions of the journal 2009-01-01 23:10:40 -05:00
f_badorphan Add support for backing up the journal inode location in the 2003-08-21 00:40:26 -04:00
f_badprimary Clean up e2fsck problem description messages for typo's and to make them 2005-06-19 09:45:36 -04:00
f_badroot libext2fs: display partial path if fs corrupted in ext2fs_get_pathname() 2012-01-17 15:38:31 -05:00
f_badsymlinks Overhaul extended attribute handling. Should now be correct with 2002-08-17 10:19:44 -04:00
f_badtable Overhaul extended attribute handling. Should now be correct with 2002-08-17 10:19:44 -04:00
f_bbfile Make e2fsck Pass 1C header consistent with the other headers 2005-07-04 13:08:37 -05:00
f_bbinode E2fsck now prints ranges in pass 5 when printing deltas in 2002-03-07 02:47:07 -05:00
f_big_sparse Check for inodes which are too big (either too many blocks, or 2002-05-21 21:19:14 -04:00
f_bitmaps Many files: 1997-10-03 17:48:10 +00:00
f_clear_xattr Fix e2fsck to not delete symlinks that contain an extended attribute after 2005-01-27 14:28:41 -05:00
f_crashdisk e2fsck: report ext2fs_open2() and ext2fs_check_desc() errors 2012-03-21 23:40:24 -04:00
f_dir_bad_mode e2fsck: Recover a special file which looks an awful lot like a directory 2007-04-02 10:08:59 -04:00
f_dirlink Many files: 1997-04-29 14:53:37 +00:00
f_dup e2fsck: fix mysterious "FILE SYSTEM WAS MODIFIED" with no changes 2011-06-16 01:22:02 -04:00
f_dup2 e2fsck: fix mysterious "FILE SYSTEM WAS MODIFIED" with no changes 2011-06-16 01:22:02 -04:00
f_dup3 libext2fs: Don't use the extended rec_len encoding for standard file systems 2010-12-22 13:53:02 -05:00
f_dup4 tests: use make rules to run tests in parallel 2012-05-29 08:41:26 -04:00
f_dup_ba tests: add test case for multiply claimed blocks with bigalloc 2011-11-28 11:03:08 -05:00
f_dup_de tests: use make rules to run tests in parallel 2012-05-29 08:41:26 -04:00
f_dup_de2 e2fsck: Fix duplicate directory entries for non-indexed directories 2009-11-16 21:56:24 -05:00
f_dup_resize tests: use make rules to run tests in parallel 2012-05-29 08:41:26 -04:00
f_dupdot libext2fs: display partial path if fs corrupted in ext2fs_get_pathname() 2012-01-17 15:38:31 -05:00
f_dupfsblks libext2fs: Don't use the extended rec_len encoding for standard file systems 2010-12-22 13:53:02 -05:00
f_dupsuper Make e2fsck Pass 1C header consistent with the other headers 2005-07-04 13:08:37 -05:00
f_ea_checks e2fsprogs-tests-f_ea_checks.patch 2008-02-18 21:45:33 -05:00
f_end-bitmap e2fsck: fix mysterious "FILE SYSTEM WAS MODIFIED" with no changes 2011-06-16 01:22:02 -04:00
f_eofblocks tests: add new test f_eofblocks 2012-04-10 23:50:37 -04:00
f_expand libext2fs: display partial path if fs corrupted in ext2fs_get_pathname() 2012-01-17 15:38:31 -05:00
f_ext_journal tests: use make rules to run tests in parallel 2012-05-29 08:41:26 -04:00
f_ext_zero_len e2fsck: check for zero length extent 2012-03-11 23:31:38 -04:00
f_extent_bad_node Add e2fsck regression test case f_extent_bad_node 2008-12-25 22:47:03 -05:00
f_extent_interior_start_lblk tests: add test of an incorrect interior node in an extent tree 2012-12-20 21:48:08 -05:00
f_extent_oobounds tests: add new test f_extent_oobounds 2013-06-06 23:53:31 -04:00
f_extents Activate basic f_extents test case 2008-02-18 20:11:07 -05:00
f_extents2 e2fsck: Fix double-counting of non-contiguous extent-based inodes 2008-12-22 01:23:59 -05:00
f_extra_journal e2fsck: Remove "ext3" from problem descriptions of the journal 2009-01-01 23:10:40 -05:00
f_fast_symlink_extents Add new test case to check e2fsck's response to fast symlinks w/ EXTENTS_FL 2008-03-24 08:24:45 -04:00
f_file_acl_high e2fsck: On a 32-bit filesystem, make sure i_file_acl_high is zero 2009-04-23 21:31:16 -04:00
f_filetype Overhaul extended attribute handling. Should now be correct with 2002-08-17 10:19:44 -04:00
f_full_bg e2fsck: Fix check to see if an extent-based file is fragmented 2008-08-10 22:43:24 -04:00
f_h_badnode tests: use make rules to run tests in parallel 2012-05-29 08:41:26 -04:00
f_h_badroot tests: use make rules to run tests in parallel 2012-05-29 08:41:26 -04:00
f_h_normal tests: use make rules to run tests in parallel 2012-05-29 08:41:26 -04:00
f_h_reindex tests: use make rules to run tests in parallel 2012-05-29 08:41:26 -04:00
f_h_unsigned tests: use make rules to run tests in parallel 2012-05-29 08:41:26 -04:00
f_holedir e2fsck: Fix directory i_size handling 2008-03-13 00:58:54 -04:00
f_holedir2 tests: Add new test f_holedir2 2009-11-29 01:28:14 -05:00
f_hurd ChangeLog, problem.c, problem.h, super.c: 2000-05-08 13:33:17 +00:00
f_illbbitmap e2fsck: report ext2fs_open2() and ext2fs_check_desc() errors 2012-03-21 23:40:24 -04:00
f_illibitmap e2fsck: report ext2fs_open2() and ext2fs_check_desc() errors 2012-03-21 23:40:24 -04:00
f_illitable e2fsck: report ext2fs_open2() and ext2fs_check_desc() errors 2012-03-21 23:40:24 -04:00
f_illitable_flexbg e2fsck: report ext2fs_open2() and ext2fs_check_desc() errors 2012-03-21 23:40:24 -04:00
f_imagic Overhaul extended attribute handling. Should now be correct with 2002-08-17 10:19:44 -04:00
f_imagic_fs tests: use make rules to run tests in parallel 2012-05-29 08:41:26 -04:00
f_invalid_bad_inode e2fsck: check for invalid bad block inode 2011-09-28 18:34:33 -04:00
f_invalid_extent_symlink e2fsck: correctly deallocate invalid extent-mapped symlinks 2013-07-28 22:03:01 -04:00
f_jnl_32bit tests: clean up sed filtering of test output 2013-06-15 18:44:09 -04:00
f_jnl_64bit tests: clean up sed filtering of test output 2013-06-15 18:44:09 -04:00
f_jnl_errno tests: clean up sed filtering of test output 2013-06-15 18:44:09 -04:00
f_journal Add support for backing up the journal inode location in the 2003-08-21 00:40:26 -04:00
f_lotsbad Check for inodes which are too big (either too many blocks, or 2002-05-21 21:19:14 -04:00
f_lpf e2fsck: fix mysterious "FILE SYSTEM WAS MODIFIED" with no changes 2011-06-16 01:22:02 -04:00
f_lpf2 Fix bug in e2fsck: When reconnecting a directory, we may 2003-12-12 03:00:56 -05:00
f_lpffile Overhaul extended attribute handling. Should now be correct with 2002-08-17 10:19:44 -04:00
f_messy_inode E2fsck now prints ranges in pass 5 when printing deltas in 2002-03-07 02:47:07 -05:00
f_miss_blk_bmap e2fsck: report ext2fs_open2() and ext2fs_check_desc() errors 2012-03-21 23:40:24 -04:00
f_miss_journal e2fsck: Remove "ext3" from problem descriptions of the journal 2009-01-01 23:10:40 -05:00
f_misstable e2fsck: report ext2fs_open2() and ext2fs_check_desc() errors 2012-03-21 23:40:24 -04:00
f_mke2fs2b Overhaul extended attribute handling. Should now be correct with 2002-08-17 10:19:44 -04:00
f_mmp tests: kill debugfs on interrupted MMP test 2012-09-16 22:05:21 -04:00
f_mmp_garbage tests: use make rules to run tests in parallel 2012-05-29 08:41:26 -04:00
f_noroot Overhaul extended attribute handling. Should now be correct with 2002-08-17 10:19:44 -04:00
f_okgroup e2fsck: avoid unnecessary reboots in some cases when checking the root fs 2011-09-30 23:12:37 -04:00
f_orphan ChangeLog, hold_inode.c, random_exercise.c: 2000-08-20 21:48:45 +00:00
f_orphan_dotdot_ft libext2fs: display partial path if fs corrupted in ext2fs_get_pathname() 2012-01-17 15:38:31 -05:00
f_orphan_extents_inode tests: add two more tests of orphaned inode handling 2012-06-12 01:38:57 -04:00
f_orphan_indirect_inode tests: clean up sed filtering of test output 2013-06-15 18:44:09 -04:00
f_overfsblks e2fsck: report ext2fs_open2() and ext2fs_check_desc() errors 2012-03-21 23:40:24 -04:00
f_preen tests: clean up sed filtering of test output 2013-06-15 18:44:09 -04:00
f_recnect_bad Clean up e2fsck problem description messages for typo's and to make them 2005-06-19 09:45:36 -04:00
f_reconnect Many files: 1997-04-29 16:17:09 +00:00
f_rehash_dir tests: use make rules to run tests in parallel 2012-05-29 08:41:26 -04:00
f_resize_inode tests: clean up sed filtering of test output 2013-06-15 18:44:09 -04:00
f_salvage_dir e2fsck: Interpret negative blkcount in file system problem reports 2009-10-04 18:02:24 -04:00
f_selinux Add f_selinux test case. 2004-01-30 01:59:42 -05:00
f_special_ea Add support for backing up the journal inode location in the 2003-08-21 00:40:26 -04:00
f_summary_counts e2fsck: fix mysterious "FILE SYSTEM WAS MODIFIED" with no changes 2011-06-16 01:22:02 -04:00
f_toobig_extent_dir e2fsck: check extent-mapped directories with really large logical blocks 2013-07-28 21:03:00 -04:00
f_uninit_ext_past_eof tests: add new test f_zero_extent_length 2012-06-11 01:06:50 -04:00
f_uninit_ext_past_eof2 tests: add another test for uninit extents past eof 2013-09-26 20:17:09 -04:00
f_uninit_last_uninit tests: use make rules to run tests in parallel 2012-05-29 08:41:26 -04:00
f_unsorted_EAs e2fsprogs-tests-f_unsorted_EAs.patch 2008-02-18 21:44:36 -05:00
f_unused_itable tests: use make rules to run tests in parallel 2012-05-29 08:41:26 -04:00
f_valid_ea_in_inode Fix the test image so that it actually has an ea-in-inode. 2005-03-21 17:15:18 -05:00
f_zero_group e2fsck: report ext2fs_open2() and ext2fs_check_desc() errors 2012-03-21 23:40:24 -04:00
f_zero_inode_size e2fsck: report ext2fs_open2() and ext2fs_check_desc() errors 2012-03-21 23:40:24 -04:00
f_zero_super e2fsck: report ext2fs_open2() and ext2fs_check_desc() errors 2012-03-21 23:40:24 -04:00
f_zero_xattr tests: add new test f_zero_xattr 2013-04-25 00:29:09 -04:00
i_e2image tests: use make rules to run tests in parallel 2012-05-29 08:41:26 -04:00
m_bigjournal tests: clean up sed filtering of test output 2013-06-15 18:44:09 -04:00
m_dasd_bs tests: clean up sed filtering of test output 2013-06-15 18:44:09 -04:00
m_extent_journal tests: clean up sed filtering of test output 2013-06-15 18:44:09 -04:00
m_large_file tests: clean up sed filtering of test output 2013-06-15 18:44:09 -04:00
m_meta_bg tests: clean up sed filtering of test output 2013-06-15 18:44:09 -04:00
m_mkfs_overhead tests: clean up sed filtering of test output 2013-06-15 18:44:09 -04:00
m_mmp tests: clean up sed filtering of test output 2013-06-15 18:44:09 -04:00
m_no_opt tests: clean up sed filtering of test output 2013-06-15 18:44:09 -04:00
m_raid_opt mke2fs: sort option parsing, deprecate "-R" 2013-06-15 18:47:30 -04:00
m_root_owner mke2fs: don't set root dir UID/GID automatically 2013-06-15 21:51:33 -04:00
m_std tests: clean up sed filtering of test output 2013-06-15 18:44:09 -04:00
m_uninit tests: clean up sed filtering of test output 2013-06-15 18:44:09 -04:00
progs crcsum: remove the -b option since ext2fs_crc32c_be is dropped in 1.43.x 2013-04-22 00:04:36 -04:00
r_64bit_big_expand tests: add more tests for off-line resizing 2013-03-31 20:41:23 -04:00
r_1024_small_bg tests: add more tests for off-line resizing 2013-03-31 20:41:23 -04:00
r_bigalloc_big_expand tests: add more tests for off-line resizing 2013-03-31 20:41:23 -04:00
r_ext4_big_expand tests: add more tests for off-line resizing 2013-03-31 20:41:23 -04:00
r_ext4_small_bg tests: add more tests for off-line resizing 2013-03-31 20:41:23 -04:00
r_inline_xattr tests: clean up sed filtering of test output 2013-06-15 18:44:09 -04:00
r_move_itable tests: clean up sed filtering of test output 2013-06-15 18:44:09 -04:00
r_resize_inode tests: clean up sed filtering of test output 2013-06-15 18:44:09 -04:00
scripts tests: add more tests for off-line resizing 2013-03-31 20:41:23 -04:00
t_ext_jnl_rm tests: use make rules to run tests in parallel 2012-05-29 08:41:26 -04:00
t_mmp_1on tests: use make rules to run tests in parallel 2012-05-29 08:41:26 -04:00
t_mmp_2off tests: use make rules to run tests in parallel 2012-05-29 08:41:26 -04:00
u_mke2fs tests: use make rules to run tests in parallel 2012-05-29 08:41:26 -04:00
u_tune2fs tests: use make rules to run tests in parallel 2012-05-29 08:41:26 -04:00
Makefile.in tests: use make rules to run tests in parallel 2012-05-29 08:41:26 -04:00
README Add extra checks for bad symlinks, including zero length symlinks, 2001-08-04 00:51:18 -06:00
filter.sed tests: clean up sed filtering of test output 2013-06-15 18:44:09 -04:00
mke2fs.conf.in mke2fs: disable progress reporting in mke2fs.conf for regression tests 2012-09-16 20:43:07 -04:00
run_e2fsck tests: clean up sed filtering of test output 2013-06-15 18:44:09 -04:00
run_mke2fs tests: clean up sed filtering of test output 2013-06-15 18:44:09 -04:00
test_config libext2fs, tests: allow /etc/mtab file to be missing 2013-07-08 12:08:44 -04:00
test_one.in tests: allow e2fsck tests to run on OS/X 2012-06-12 13:59:56 -04:00
test_post tests: use make rules to run tests in parallel 2012-05-29 08:41:26 -04:00
test_script.in tests: use make rules to run tests in parallel 2012-05-29 08:41:26 -04:00

README

These images contain various forms of corrupted filesystem which
e2fsck will correct.  They are used as a regression test for e2fsck.

The test_script program will automatically run e2fsck against the
filesystem images.  It will run them two times, and display the exit
status for each run.  The meaning of the exit status codes are as
follows:

	0		No filesystem errors were detected
	1		Filesystem errors detected, but corrected
	2		System should be rebooted
	4		Filesystem errors left uncorrected
	8		Operational error (generally means internal error,
				or filesystem error that the e2fsck was not
				prepared to deal with)
	16		Usage or syntax error

During the regression test, the first exit code should be 1, and the
second exit code should be 0.  In other words, all (with one
exception) of the test filesystems in this directory have some sort of
filesystem corruption, which e2fsck should fix on the first pass.
After the first pass, e2fsck should leave a fully consistent
filesystem with no detectable errors found in the second pass.  The
exception is the okgroup.img filesystem, which contains no errors, and
so both exit codes should be 0.

NOTE: It appears that at least some versions of the original e2fsck do
not exit with an exit status code of 1 after correcting filesystem
errors.  So if you modify the test_script to try running these
filesystems against the original e2fsck, you will have to inspect the
test_script.log file manually.

--------------------------------------------------------------
Here's a one-line descriptons of the various test images in this
directory:

baddir.img		Filesystem with a corrupted directory
badbblocks.img		Filesystem with illegal blocks in the bad block inode.
badinode.img		Filesystem with various different corrupted inode
				entries.
badlkcnt.img		Filesystem with deleted files with non-zero link count
badroot.img		Filesystem with a file for a root directory
badtable.img		Filesystem with blocks shared between the bitmaps and
				inode table blocks and the bad block inode
bbfile.img		Filesystem with files containing bad blocks
bitmaps.img		Filesystem with corrupted inode and block bitmaps
dirlink.img		Filesystem with a hard link to a directory
dup.img			Filesystem with blocks claimed by two different files
dup2.img		Filesystem with blocks claimed by three different files
dupfsblks.img		Filesystem with blocks claimed by a file and
				inode/block bitmaps and inode tables
dupsuper.img		Filesystem with blocks claimed by a file and
				the superblock / group descriptors
end-bitmap.img		Filesystem with corruption at the end of the block 
				bitmap
expand.img		Tests e2fsck's ability to expand lost+found if 
				necessary
lpf.img			Filesystem with disconnected files and no /lost+found 
				directory
mke2fs2b.img		Filesystem with corruption similar to that
				created by mke2fs version 0.2b
noroot.img		Filesystem with a deleted root directory
okgroup.img		Filesystem that's exactly 8193 blocks long 
				(otherwise OK)
overfsblks.img		Filesystem with overlapping inode and block bitmaps
symlinks.img		Filesystem with bad symlink sizes