e2fsprogs/tests
Theodore Ts'o a435ec3449 Add support for backing up the journal inode location in the
superblock.  E2fsck will automatically save the journal information
in the superblock if it is not there already, and will use it if the
journal inode appears to be corrupted.  ext2fs_add_journal_inode() 
will also save the backup information, so that new filesystems
created by mke2fs and filesystems that have journals added via
tune2fs will also have journal location written to the superblock as
well.  Debugfs's logdump command has been enhanced so that it can
use the journal information in the superblock.

The debugfs man page has been improved to more fully describe the
logdump command.

Added two new functions, ext2fs_file_open2() and 
ext2fs_inode_io_intern2() which take a pointer to an inode structure;
this is needed so that e2fsck and debugfs can synthesize a
fake journal inode and use it to access the journal.
2003-08-21 00:40:26 -04:00
..
d_loaddump ChangeLog, expect, script: 2001-06-01 15:14:38 +00:00
defaults Fix up lots of portability problems that caused e2fsprogs not to build successfully 2003-03-06 11:09:18 -05:00
e_brel_bma ChangeLog, script: 1997-10-25 22:43:58 +00:00
e_icount_normal Many files: 1997-04-29 17:48:10 +00:00
e_icount_opt Many files: 1997-04-29 17:48:10 +00:00
e_irel_ima ChangeLog, script: 1997-10-25 22:43:58 +00: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_local_jnl Add support for backing up the journal inode location in the 2003-08-21 00:40:26 -04:00
f_badbblocks Many files: 1997-10-03 17:48:10 +00:00
f_baddir E2fsck now updates the global free block and 2003-04-05 22:50:44 -05:00
f_baddotdir Many files: 1997-10-03 17:48:10 +00:00
f_badinode Overhaul extended attribute handling. Should now be correct with 2002-08-17 10:19:44 -04:00
f_badorphan Add support for backing up the journal inode location in the 2003-08-21 00:40:26 -04:00
f_badprimary Many files: 1997-10-03 17:48:10 +00:00
f_badroot Overhaul extended attribute handling. Should now be correct with 2002-08-17 10:19:44 -04: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 Change e2fsck to use a red/black tree in pass1b, to remove O(n**2) 2002-08-01 12:37:00 -04: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_crashdisk Many files: 1997-04-29 14:53:37 +00:00
f_dirlink Many files: 1997-04-29 14:53:37 +00:00
f_dup E2fsck now updates the global free block and 2003-04-05 22:50:44 -05:00
f_dup2 E2fsck now updates the global free block and 2003-04-05 22:50:44 -05:00
f_dup3 Change e2fsck to use a red/black tree in pass1b, to remove O(n**2) 2002-08-01 12:37:00 -04:00
f_dup_de Fix tests so that they work even with --disable-htree. 2003-08-01 13:25:26 -04:00
f_dupdot Overhaul extended attribute handling. Should now be correct with 2002-08-17 10:19:44 -04:00
f_dupfsblks Change e2fsck to use a red/black tree in pass1b, to remove O(n**2) 2002-08-01 12:37:00 -04:00
f_dupsuper E2fsck now prints ranges in pass 5 when printing deltas in 2002-03-07 02:47:07 -05:00
f_end-bitmap E2fsck now updates the global free block and 2003-04-05 22:50:44 -05:00
f_expand Add support to e2fsck to reindex directories to use hash trees. 2002-07-20 00:28:07 -04:00
f_ext_journal Fix e2fsck's handling of external journals,and update journal 2001-12-16 02:23:36 -05:00
f_extra_journal Fixed the journal handling so that an offer is made to clear the 2002-03-07 03:13:07 -05:00
f_filetype Overhaul extended attribute handling. Should now be correct with 2002-08-17 10:19:44 -04:00
f_h_badnode f_h_badnode, f_h_badroot, f_h_reindex: Updated expect script to 2003-03-25 23:08:29 -05:00
f_h_badroot Add support for backing up the journal inode location in the 2003-08-21 00:40:26 -04:00
f_h_normal Add support for the half-MD4 HTREE hash. 2002-06-26 16:52:10 -04:00
f_h_reindex Add support for backing up the journal inode location in the 2003-08-21 00:40:26 -04:00
f_holedir Many files: 1997-04-29 16:17:09 +00:00
f_hurd ChangeLog, problem.c, problem.h, super.c: 2000-05-08 13:33:17 +00:00
f_illbbitmap E2fsck now prints ranges in pass 5 when printing deltas in 2002-03-07 02:47:07 -05:00
f_illibitmap E2fsck now prints ranges in pass 5 when printing deltas in 2002-03-07 02:47:07 -05:00
f_illitable Overhaul extended attribute handling. Should now be correct with 2002-08-17 10:19:44 -04:00
f_imagic Overhaul extended attribute handling. Should now be correct with 2002-08-17 10:19:44 -04:00
f_imagic_fs Overhaul extended attribute handling. Should now be correct with 2002-08-17 10:19:44 -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 now updates the global free block and 2003-04-05 22:50:44 -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 now prints ranges in pass 5 when printing deltas in 2002-03-07 02:47:07 -05:00
f_miss_journal Fixed the journal handling so that an offer is made to clear the 2002-03-07 03:13:07 -05:00
f_misstable E2fsck now prints ranges in pass 5 when printing deltas in 2002-03-07 02:47:07 -05:00
f_mke2fs2b Overhaul extended attribute handling. Should now be correct with 2002-08-17 10:19:44 -04:00
f_noroot Overhaul extended attribute handling. Should now be correct with 2002-08-17 10:19:44 -04:00
f_okgroup Many files: 1997-04-29 14:53:37 +00:00
f_orphan ChangeLog, hold_inode.c, random_exercise.c: 2000-08-20 21:48:45 +00:00
f_overfsblks E2fsck now prints ranges in pass 5 when printing deltas in 2002-03-07 02:47:07 -05:00
f_preen name: 1998-07-06 14:49:09 +00:00
f_recnect_bad Overhaul extended attribute handling. Should now be correct with 2002-08-17 10:19:44 -04:00
f_reconnect Many files: 1997-04-29 16:17:09 +00:00
f_salvage_dir Fix tests so that they work even with --disable-htree. 2003-08-01 13:25:26 -04:00
f_special_ea Add support for backing up the journal inode location in the 2003-08-21 00:40:26 -04:00
f_swapfs Fix up lots of portability problems that caused e2fsprogs not to build successfully 2003-03-06 11:09:18 -05:00
f_zero_group Many files: 1997-10-03 17:48:10 +00:00
f_zero_super Many files: 1997-10-03 17:48:10 +00:00
progs Update for 1.34 release. 2003-07-26 01:03:34 -04:00
.cvsignore .cvsignore: 2000-05-25 23:19:08 +00:00
ChangeLog Add support for backing up the journal inode location in the 2003-08-21 00:40:26 -04:00
Makefile.in Add initial support for htree directories. 2002-06-25 23:26:34 -04:00
README Add extra checks for bad symlinks, including zero length symlinks, 2001-08-04 00:51:18 -06:00
run_e2fsck Fix up lots of portability problems that caused e2fsprogs not to build successfully 2003-03-06 11:09:18 -05:00
test_config test_config: Define DYLD_LIBRAY_PATH so that "make check" works on 2003-04-19 14:22:19 -04:00
test_script.in Lots of small random portability fixes to make e2fsprogs build 2002-02-12 02:34:44 -05:00

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