summaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)AuthorFilesLines
2008-03-13e2fsck: Use "Clear Htree" instead of "Clear" when the Htree is corruptTheodore Ts'o4-2/+960
Change the prompt so it is clear to the user that e2fsck will be clearing the htree information, not the directory inode itself, when the htree information has proven to be corrupt. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-03-13e2fsck: Fix directory i_size handlingTheodore Ts'o2-4/+11
If a directory's i_size is bigger than the number of blocks, don't try to allocate extra empty blocks to the end of the directory; there's no real point to do that. Also, if a directory's i_size is not a multiple of the blocksize, flag that as a mistake so it can be fixed. This more elegantly addresses the problem which was found on Bas van Schaik's filesystem. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-02-29Merge branch 'maint'Theodore Ts'o8-4/+75
2008-02-28Improve descriptions for the r_move_itable and r_resize_inode testsTheodore Ts'o4-4/+3
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-02-28Add regression test for resize2fs moving inodes with inline xattrsEric Sandeen4-0/+72
The image contains an inode past the resize point with an inline xattr value of "propervalue". It also contains deleted inodes which had the xattr value "oldvalue". When resize2fs moves the inode, it should copy the xattr as well, so that post-resize we see "propervalue" not "oldvalue". Signed-off-by: Eric Sandeen <sandeen@redhat.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-02-27Merge branch 'maint'Theodore Ts'o1-0/+1
Conflicts: lib/blkid/devname.c lib/blkid/probe.c misc/mke2fs.c misc/tune2fs.c
2008-02-22libe2p: Change Raid to RAID in display optionTheodore Ts'o1-0/+1
Update m_raid_opt test so that it reflects the code change. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-02-22mke2fs: Remove warning for inode_size > 128 bytesTheodore Ts'o1-1/+0
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-02-18e2fsprogs-tests-f_ea_checks.patchAndreas Dilger4-0/+65
Test case for various types of extended attribute block corruption Signed-off-by: Andreas Dilger <adilger@sun.com>
2008-02-18e2fsprogs-tests-f_unsorted_EAs.patchAndreas Dilger4-0/+19
Test case for allowing unsorted EAs in the fast in-inode space. Signed-off-by: Andreas Dilger <adilger@sun.com>
2008-02-18Activate basic f_extents test caseTheodore Ts'o4-2/+60
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-02-18e2fsck: Add support for extentsTheodore Ts'o2-27/+13
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-02-10Merge branch 'maint' into nextTheodore Ts'o1-0/+3
2008-02-10Set the C locale in the tests/test_script driverTheodore Ts'o1-0/+3
Since the test_script driver uses [A-Za-z], we need to set the locale so we don't get bitten on locals where the sort order might be different. Addresses-Sourceforge-Bug: #1890526 Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-01-27Merge branch 'maint' into nextTheodore Ts'o7-24/+25
Conflicts: configure lib/ext2fs/ext2_fs.h misc/e2image.c
2008-01-27Create filesystems with the ext_attr feature by defaultTheodore Ts'o7-17/+17
Since recent kernels have a tendency to set this feature willy-nilly, let's just enable by default. It's only very old kernels that don't support it any more. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-01-27Create new filesystems with 256-byte inodes by defaultTheodore Ts'o1-7/+8
This makes it easier to upgrade to ext4 in the future, and it speeds up extended attributes handling --- important on SELinux systems! Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2007-10-06Merge branch 'maint'Theodore Ts'o10-6/+25
2007-09-07Add test for the case where s_inode_size is zeroTheodore Ts'o4-0/+18
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-07Delete the test.img file after running the resize2fs testsTheodore Ts'o2-3/+3
The resize2fs tests, r_move_itable and r_resize_inode, were not deleting the test.img tmpfile after completing the test. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2007-09-07e2fsck: If the superblock is corrupt, automatically retry with the backup sbTheodore Ts'o4-3/+4
E2fsck currently only retries with the backup superblock if the primary superblock is missing (e.g., overwritten with garbage). If the superblock is just corrupted enough that it looks like ext2/3/4 superblock, but it is corrupt enough that ext2fs_open2() returns an error, e2fsck stops without retrying. Let's fix this oversight. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2007-08-11Remove e2fsck's swapfs test, since we've removed the functionalityTheodore Ts'o6-218/+0
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2007-07-22Fix mke2fs tests to avoid needing any significant ^M (CR) charactersTheodore Ts'o3-10/+10
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2007-07-22Fix test in ext2fs_check_desc() for inode table within block groupEric Sandeen4-0/+15
The test in ext2fs_check_desc() is off by one; if the inode table goes all the way to the last block of the block group, it will falsely assert that it has extended past it. The last block of a range is start + len -1, not start + len. You can create (valid) filesystems that will cause e2fsck to complain via one of the following mkfs commands: mkfs.ext3 -F -b 1024 /dev/sdb1 2046000000 mke2fs -j -F -b 4096 -m 0 -N 5217280 /mnt/test/fsfile2 327680 mkfs.ext2 -F -b 1024 -m 0 -g 256 -N 3744 fsfile 1024 Addresses-Red-Hat-Bugzilla: #214765 Signed-off-by: Eric Sandeen <sandeen@redhat.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2007-07-22Properly calculate overhead in ext2fs_initialize()Theodore Ts'o2-0/+15
For some odd geometries*, mkfs will try to allocate inode tables off the end of the block group and fail, rather than warning that too many inodes have been requested. This is because when ext2fs_initialize calculates metadata overhead, it is only adding in group descriptor blocks and the superblock if the *last* bg contains them - but the first bg also has all of the various metadata bits taking up space. We need to calculate the overhead both for the first block group and the last block groups separately, since the two different tests need to know what the overheads are for those two cases, which may be different. *for example "mke2fs -b 1024 -m 0 -g 256 -N 3745 fsfile 1024" (Note, the test here is a little funky; the expected output is actually a mkfs failure - but a proper failure instead of the allocator catching the problem at the last minute) Addresses-Red-Hat-Bugzilla: #241767 Signed-off-by: Eric Sandeen <sandeen@redhat.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2007-07-10e2fsck: Fix salvage_directory when the last entry's rec_len is too bigKalpak Shah4-0/+20
Recently, one of our customers found this message in pass2 of e2fsck while doing some regression testing: "Entry '4, 0x695a, 0x81ff, 0x0040, 0x8320, 0xa192, 0x0021' in ??? (136554) has rec_len of 14200, should be 26908." Both the displayed rec_len and the "should be" value are bogus. The reason is that salvage_directory sets a offset beyond blocksize leading to bogus messages. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2007-07-08Remove Changelog files since they're not used after the git migrationTheodore Ts'o2-1079/+0
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2007-06-30Set LC_ALL instead of LANG in the test suite configTheodore Ts'o1-2/+2
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-24Update Release Notes, Changelogs, version.h, etc. for 1.40 releaseTheodore Ts'o2-0/+8
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2007-06-21New regression test which contains a corrupt ind. block in the journal inodeKalpak Shah6-0/+46
Signed-off-by: Kalpak Shah <kalpak@clusterfs.com> Signed-off-by: Andreas Dilger <adilger@clusterfs.com>
2007-06-21Recreate journal that had been removed previously due to corruptionKalpak Shah4-4/+16
If the journal had been removed because it was corrupt, the E2F_FLAG_JOURNAL_INODE flag will be set. If this flag is set, then recreate the filesystem after checking the filesystem. Signed-off-by: Kalpak Shah <kalpak@clusterfs.com> Signed-off-by: Andreas Dilger <adilger@clusterfs.com>
2007-04-14Fix typo in name of f_dup4 regression testTheodore Ts'o1-1/+1
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2007-04-10e2fsck: pass1c terminates early if hard linksJim Garlick5-0/+179
I think this is a small buglet in e2fsck: if a file has multiple hard links, e2fsck pass1c search_dirent_proc() doesn't maintain its count properly and may return DIRENT_ABORT before it has found containing directories for all inodes sharing blocks. Signed-off-by: Jim Garlick <garlick@llnl.gov> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2007-04-07Make the test_script ignore and skip empty test directoriesTheodore Ts'o2-0/+7
When patching and unpatching quilt files, empty directories get left behind in the tests/ directory. Ignore them to avoid false test failures. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2007-04-07Fix up usage and decrement error messages in the test_icount programTheodore Ts'o4-18/+24
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2007-04-02e2fsck: Recover a special file which looks an awful lot like a directoryTheodore Ts'o5-0/+24
This is probably only useful in artificial test cases, but it will be useful if we ever do the "inodes in directory" idea for ext4. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2007-03-31Fix e2fsck to set the filetype of '..' when connecting a dir, to lost+foundTheodore Ts'o5-0/+70
If there is an orphaned inode whose '..' entry is pointing at a special file, the filetype of the '..' entry will set to the type of the special file. When the orphaned directory is reconnected to /lost+found, the filetype of the '..' field is not reset to EXT2_FT_DIR, so a second e2fsck is required to repair the filesystem. We address this situation by setting the filetype of '..' when we reconnect the inode to /lost+found. Addresses Lustre Bug: #11645 Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2006-11-12Check in binary extent test image file into the source tree.Theodore Ts'o3-0/+9
This is not yet ready to be used yet, but add it into the tree so that future patches don't have to deal with manually adding this binary image file into the tree. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2006-11-11Add directory hashed signed/unsigned hint to superblockTheodore Ts'o15-3/+40
The e2fsprogs and kernel implementation of directory hash tree has a bug which causes the implementation to be dependent on whether characters are signed or unsigned. Platforms such as the PowerPC, Arm, and S/390 have signed characters by default, which means that hash directories on those systems are incompatible with hash directories on other systems, such as the x86. To fix this we add a new flags field to the superblock, and define two new bits in that field to indicate whether or not the directory should be signed or unsigned. If the bits are not set, e2fsck and fixed kernels will set them to the signed/unsigned value of the currently running platform, and then respect those bits when calculating the directory hash. This allows compatibility with current filesystems, as well as allowing cross-architectural compatibility. Addresses Debian Bug: #389772 Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2006-11-11Add new a new tests make target "checked-failed" which reruns any failed testsTheodore Ts'o2-0/+12
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2006-11-11On-disk format definition for huge filesTheodore Ts'o3-5/+7
- EXT4_FEATURE_RO_COMPAT_HUGE_FILE (0x0008) - change i_blocks to be in units of s_blocksize units instead of 512-byte sectors, use l_i_frag and l_i_fsize as i_blocks_hi (could also be part of 64BIT). E2fsck and debugfs changed to support i_blocks_hi instead of l_i_frag and l_i_fsize. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2006-09-12Create new ext2fs library inlines: ext2fs_group_{first,last}_block()Eric Sandeen2-2/+8
Create new ext2fs library inline functions in order to calculate the starting and ending blocks in a block group. Signed-off-by: Eric Sandeen <esandeen@redhat.com>
2006-08-06If diff -u is supported, use it to report test failures.Theodore Ts'o3-1/+6
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2006-05-30Change more "echo -n" to "printf" to avoid screen clutter.Matthias Andree4-4/+4
Signed-off-by: Matthias Andree <matthias.andree@gmx.de>
2006-05-28Make test scripts more robust against locale-related environment variablesTheodore Ts'o2-1/+6
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2006-05-24Update tests to reflect updated mke2fs.conf fileTheodore Ts'o10-354/+448
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2006-05-13Change mke2fs's layout of RAID-optimized filesystems to be more optimalTheodore Ts'o2-43/+48
When allocating space for the RAID filesystems with the stride parameter, place each portion of the group's inode table right up after the superblock (if present) in order to minimize fragmentation of the freespace. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2006-03-23Change mke2fs to use /etc/mke2fs.conf as a configuration fileTheodore Ts'o2-0/+8
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2005-12-31Add E2FSCK_CONFIG environment variableTheodore Ts'o1-0/+2
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-09-24E2fsck: fix future times in the superblock's last mount or last write fieldsTheodore Ts'o2-0/+7
Detect if the superblock's last mount field or last write field is in the future, and offer to fix if so. (Addresses Debian Bug #327580) Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>