e2fsprogs/tests
Theodore Ts'o 29cf185826 Add test for the case where s_inode_size is zero
Older e2fsck's would crash; e2fsck should now automatically retry
using the backup superblock if it is present.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2007-09-07 17:06:25 -04:00
..
d_loaddump Update tests to reflect updated mke2fs.conf file 2006-05-24 13:07:41 -04:00
defaults defaults/e_script, run_e2fsck, d_loaddump, f_resize_inode, 2005-06-16 15:08:00 -04: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_disconnected_inode On-disk format definition for huge files 2006-11-11 06:32:03 -05: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 Clean up e2fsck problem description messages for typo's and to make them 2005-06-19 09:45:36 -04:00
f_baddir2 e2fsck: Fix salvage_directory when the last entry's rec_len is too big 2007-07-10 07:28:35 -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 New regression test which contains a corrupt ind. block in the journal inode 2007-06-21 13:30:06 -04:00
f_badjourblks Recreate journal that had been removed previously due to corruption 2007-06-21 11:59:06 -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 Clean up e2fsck problem description messages for typo's and to make them 2005-06-19 09:45:36 -04: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 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: If the superblock is corrupt, automatically retry with the backup sb 2007-09-07 16:54:11 -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 Make e2fsck Pass 1C header consistent with the other headers 2005-07-04 13:08:37 -05:00
f_dup2 Make e2fsck Pass 1C header consistent with the other headers 2005-07-04 13:08:37 -05:00
f_dup3 Make e2fsck Pass 1C header consistent with the other headers 2005-07-04 13:08:37 -05:00
f_dup4 Fix typo in name of f_dup4 regression test 2007-04-14 14:01:57 -04:00
f_dup_de Add directory hashed signed/unsigned hint to superblock 2006-11-11 22:32:35 -05:00
f_dup_resize E2fsck: fix future times in the superblock's last mount or last write fields 2005-09-24 21:59:45 -04:00
f_dupdot Overhaul extended attribute handling. Should now be correct with 2002-08-17 10:19:44 -04:00
f_dupfsblks Make e2fsck Pass 1C header consistent with the other headers 2005-07-04 13:08:37 -05:00
f_dupsuper Make e2fsck Pass 1C header consistent with the other headers 2005-07-04 13:08:37 -05:00
f_end-bitmap E2fsck now updates the global free block and 2003-04-05 22:50:44 -05:00
f_expand m_meta_bg: New test case to test the meta block group feature. 2003-09-03 09:51:52 -04:00
f_ext_journal Fix e2fsck's handling of external journals,and update journal 2001-12-16 02:23:36 -05:00
f_extents Check in binary extent test image file into the source tree. 2006-11-12 22:57:39 -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_full_bg Fix test in ext2fs_check_desc() for inode table within block group 2007-07-22 16:00:43 -04:00
f_h_badnode Add directory hashed signed/unsigned hint to superblock 2006-11-11 22:32:35 -05:00
f_h_badroot Add directory hashed signed/unsigned hint to superblock 2006-11-11 22:32:35 -05:00
f_h_normal Add directory hashed signed/unsigned hint to superblock 2006-11-11 22:32:35 -05:00
f_h_reindex Add directory hashed signed/unsigned hint to superblock 2006-11-11 22:32:35 -05:00
f_h_unsigned Add directory hashed signed/unsigned hint to superblock 2006-11-11 22:32:35 -05: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 Clean up e2fsck problem description messages for typo's and to make them 2005-06-19 09:45:36 -04:00
f_illibitmap Clean up e2fsck problem description messages for typo's and to make them 2005-06-19 09:45:36 -04:00
f_illitable Clean up e2fsck problem description messages for typo's and to make them 2005-06-19 09:45:36 -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_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 now prints ranges in pass 5 when printing deltas in 2002-03-07 02:47:07 -05:00
f_miss_journal Recreate journal that had been removed previously due to corruption 2007-06-21 11:59:06 -04:00
f_misstable e2fsck: If the superblock is corrupt, automatically retry with the backup sb 2007-09-07 16:54:11 -04: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_orphan_dotdot_ft Fix e2fsck to set the filetype of '..' when connecting a dir, to lost+found 2007-03-31 19:18:24 -04:00
f_overfsblks E2fsck now prints ranges in pass 5 when printing deltas in 2002-03-07 02:47:07 -05:00
f_preen Clean up e2fsck problem description messages for typo's and to make them 2005-06-19 09:45:36 -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_resize_inode Change more "echo -n" to "printf" to avoid screen clutter. 2006-05-30 15:47:05 +02:00
f_salvage_dir Fix tests so that they work even with --disable-htree. 2003-08-01 13:25:26 -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 will now check the individual block group inode and block free counts, 2005-01-25 03:09:24 -05:00
f_swapfs defaults/e_script, run_e2fsck, d_loaddump, f_resize_inode, 2005-06-16 15:08:00 -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: If the superblock is corrupt, automatically retry with the backup sb 2007-09-07 16:54:11 -04:00
f_zero_inode_size Add test for the case where s_inode_size is zero 2007-09-07 17:06:25 -04:00
f_zero_super e2fsck: If the superblock is corrupt, automatically retry with the backup sb 2007-09-07 16:54:11 -04:00
m_dasd_bs Update tests to reflect updated mke2fs.conf file 2006-05-24 13:07:41 -04:00
m_large_file Update tests to reflect updated mke2fs.conf file 2006-05-24 13:07:41 -04:00
m_meta_bg Update tests to reflect updated mke2fs.conf file 2006-05-24 13:07:41 -04:00
m_mkfs_overhead Fix mke2fs tests to avoid needing any significant ^M (CR) characters 2007-07-22 16:36:51 -04:00
m_no_opt Fix mke2fs tests to avoid needing any significant ^M (CR) characters 2007-07-22 16:36:51 -04:00
m_raid_opt Create new ext2fs library inlines: ext2fs_group_{first,last}_block() 2006-09-12 14:56:16 -04:00
m_std Update tests to reflect updated mke2fs.conf file 2006-05-24 13:07:41 -04:00
progs Remove Changelog files since they're not used after the git migration 2007-07-08 08:50:41 -04:00
r_move_itable Delete the test.img file after running the resize2fs tests 2007-09-07 17:03:48 -04:00
r_resize_inode Delete the test.img file after running the resize2fs tests 2007-09-07 17:03:48 -04:00
filter_dumpe2fs Add directory hashed signed/unsigned hint to superblock 2006-11-11 22:32:35 -05:00
Makefile.in Add new a new tests make target "checked-failed" which reruns any failed tests 2006-11-11 09:45:50 -05:00
README Add extra checks for bad symlinks, including zero length symlinks, 2001-08-04 00:51:18 -06:00
run_e2fsck Change more "echo -n" to "printf" to avoid screen clutter. 2006-05-30 15:47:05 +02:00
run_mke2fs Fix mke2fs tests to avoid needing any significant ^M (CR) characters 2007-07-22 16:36:51 -04:00
test_config Set LC_ALL instead of LANG in the test suite config 2007-06-30 19:52:11 -04:00
test_script.in Make the test_script ignore and skip empty test directories 2007-04-07 23:16:11 -04: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