summaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)AuthorFilesLines
2010-12-22libext2fs: Don't use the extended rec_len encoding for standard file systemsTheodore Ts'o2-6/+9
If the file system has a blocksize less than 64k, then don't use the extended rec_len encoding, to be consistent with what the kernel will do. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2010-11-22Disable lazy inode table initialization when running regression testsTheodore Ts'o1-0/+1
This avoids test failures when running on new kernels that allow lazy itable initialization. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2010-07-05e2freefrag: Fix getopt bug on machines with unsigned charsMike Frysinger1-1/+1
The getopt() function returns an int, not a char. On systems where the default char is unsigned (like ppc), we get weird behavior where -1 is truncated to 0xff but compared to (int)-1. Also fix this same bug for two test programs, test_rel and iscan, which aren't currently used at the moment. Addresses-Gentoo-Bug: #299386 Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2010-05-14tests: Use our own mke2fs.conf fileTheodore Ts'o2-2/+46
Use a standard, fixed mke2fs.conf file so that if downstream distributions want to change the mke2fs.conf which is distributed in the RPM or dpkg file, it won't screw up the regression tests. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2010-05-11tests: Add new test f_unused_itableTheodore Ts'o4-0/+39
Add test to make sure e2fsck doesn't end up detaching and sending to lost+found inodes which are in an bg_itable_unused_region (e.g. if there was a power failure and bg_itable_unused wasn't updated because journaling wasn't enabled). Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2010-05-10e2fsck: Check for cases where EOFBLOCKS_FL is unnecessarily setTheodore Ts'o1-0/+9
Some kernels will crash if EOFBLOCKS_FL is set when it is it not needed, and this if it is left set when it isn't needed, it is a sign of a kernel bug. Addresses-Google-Bug: #2604224 Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2010-03-15tests: Add new test f_rehash_dirTheodore Ts'o4-0/+20
Add a new test which tests to make sure e2fsck -D works correctly. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-11-29tests: Add new test f_holedir2Theodore Ts'o4-0/+33
This tests e2fsck's handling of both direct and extent-mapped directoris containing holes when the i_size is 0. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-11-29e2fsck: Don't rehash directories which can fit in a single directory blockTheodore Ts'o2-7/+7
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-11-16e2fsck: Fix duplicate directory entries for non-indexed directoriesTheodore Ts'o4-0/+24
Duplicate directory entries were not necessarily getting found and fixed for non-indexed directories, since we were sorting these directories by inode number, and the duplicate entry code assumed the entries were getting sorted by name or directory name hash. Addresses-Sourceforge-Bug: #2862551 Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-10-04e2fsck: Interpret negative blkcount in file system problem reportsTheodore Ts'o8-960/+960
Non-expert users get confused when they see messages like this: Illegal block #-1 (2291965952) in inode 176. CLEARED. So change it to be something a little bit more understandable: Illegal indirect block (2291965952) in inode 176. CLEARED. Addresses-SourceForge-Bug: #2871782 Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-10-04tests: Account for new mke2fs topology informationTheodore Ts'o8-0/+8
The previous commit adds a new line printed by mke2fs with the filesystem/device topology information. Update the regression test's expected output to account for this. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-08-19f_illitable_flexbg: Add new testTheodore Ts'o4-0/+35
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-08-09libext2fs: Treat uninitialized parts of bitmaps as unallocatedTheodore Ts'o1-24/+24
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-07-02Add support for configure --enable-verbose-makecmdsTheodore Ts'o1-10/+10
Some people don't want to see the concise "kernel-style" make output. This configure option allows build engines that want to see the full set of commands executed by the makefile to get what they want. Most people will find this more distracting than useful, unless they need to debug the Makefiles. (It is not necessary to rerun configure to enable this verbose make output temprarily; if a developer wants to do a quick debug of a directory's makefile, he or she can simply edit the definition of the $(E) and $(Q) variables in the Makefile; instructions can be found in the MCONFIG file which is included in at the beginning of every Makefile.) Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-07-01Fix Makefile dependencies for libcom_errTheodore Ts'o1-1/+1
The e2fsprogs makefiles were using the same Makefile variable LIBCOM_ERR for the link-line arguments as well as the dependencies. Since LIBCOM_ERR can now include non-file arguments such as "-lpthread", we need to use a separate DEPLIBCOM_ERR variable that only has build file dependencies. Do the same thing for STATIC_LIBCOM_ERR and PROFILED_LIBCOM_ERR. Addresses-Sourceforge-Patches: #2813809 Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-06-21Fix encoding for rec_len in directories for >= 64k blocksize file systemsTheodore Ts'o2-9/+6
Previously e2fsprogs interpreted 0 for a rec_len of 65536 (which could occur if the directory block is completely empty in 64k blocksize filesystems), while the kernel interpreted 65535 to mean 65536. The kernel will accept both to mean 65536, and encodes 65535 to be 65536. This commit changes e2fsprogs to match. We add the encoding agreed upon for 128k and 256k filesystems, but we don't enable support for these larger block sizes, since they haven't been fully tested. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-06-15tests: Add --valgrind-leakcheck option to the test_script programTheodore Ts'o1-0/+5
Add an option which runs valgrind with the appropriate options for finding memory leaks. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-04-23e2fsck: On a 32-bit filesystem, make sure i_file_acl_high is zeroTheodore Ts'o4-0/+20
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-03-08tests: Filter out "Lifetime writes" from the dumpe2fs displayTheodore Ts'o1-0/+1
The Lifetime writes field will probably not be stable as we add new features to e2fsprogs, so filter it out to avoid spurious test failures. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-01-20Use format strings directly to prevent -Werror=format-security failuresTheodore Ts'o1-2/+2
Gcc is too stupid to realize that: const char *usage="String which has no percent signs"; com_err(progname, 0, usage); is OK. I refuse to bow to stupidity with: com_err(progname, 0, "%s", usage); but I will use the string directly for the sake of people who like to build with -Werror=format-security. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-01-01e2fsck: Remove "ext3" from problem descriptions of the journalTheodore Ts'o4-10/+7
The ext4 filesystem uses journals too, so remove "ext3" from the problem descriptions involving journals. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-12-25Add e2fsck regression test case f_extent_bad_nodeTheodore Ts'o4-0/+31
This test case is designed to test e2fsck's ability to deal with a corrupted interior node in an extent tree. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-12-25e2fsck: When repacking directories, leave slack space for more efficiencyTheodore Ts'o6-6/+6
If the directory is packed with no slack space, as soon as any new directory entries are added, leaf nodes end up getting split and directory ends up getting very inefficient. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-12-22e2fsck: Fix double-counting of non-contiguous extent-based inodesTheodore Ts'o2-2/+2
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-09-12Fix compiling under diet libcTheodore Ts'o1-1/+1
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-08-29tune2fs, mke2fs: Change default directory hash algorithm to half_md4Theodore Ts'o9-14/+14
The half_md4 algorithm is faster and more collision resistant. Let's switch to it as the default. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-08-27Remove trailing whitespace for the entire source treeTheodore Ts'o4-35/+35
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-08-27ext2fs_mkjournal(): Don't allocate an extra block to the journalTheodore Ts'o6-6/+6
Addresses-Sourceforge-Bug: 1483791 Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-08-24Remove trailing space from the description of the r_move_itable testTheodore Ts'o1-1/+1
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-08-24fix e2fsck error message for bad htree depthAndreas Dilger1-1/+1
Fix error message to print the depth of a corrupt htree directory. Signed-off-by: Andreas Dilger <adilger@sun.com> Signed-off-by: Kalpak Shah <kalpak.shah@sun.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2008-08-10e2fsck: Fix check to see if an extent-based file is fragmentedTheodore Ts'o16-16/+16
Also added support for "e2fsck -E fragcheck" which issues a comprehensive report of discontiguous file extents. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-07-13Flush stdio buffers before calling setbuf()Theodore Ts'o2-0/+4
On Solaris setbuf() will discard any pending output to the stream, so make we call fflush() before calling setbuf(). Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-07-13Fix Solaris shell script portability issuesTheodore Ts'o3-9/+11
Solaris ships with a pathetically ancient shell in /bin/sh, so fix various shell scripts to accomodate. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-07-10Make ext2fs_check_desc() more stringent to force use of backup superbocksTheodore Ts'o1-8/+9
E2fsck could to do more damage to a filesystem by trying to relocate inode tables due to corrupted block group descriptors, and the relocation could seriously damage the filesystem. This patch enhances ext2fs_check_desk() so it detects more self-inconsistent block group descriptors, including the cases where e2sck might be tempted to relocate the inode table, and reports the block group descriptors as invalid; this will cause e2fsck to attempt to use the backup superblocks, which hopefully have not been trashed. Addresses-Sourceforge-Bug: #1840291 Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-06-17Merge branch 'maint'Theodore Ts'o2-7/+7
Conflicts: README resize/online.c version.h
2008-06-17mke2fs, tune2fs, resize2fs: Use floating point to calculate percentagesTheodore Ts'o2-7/+7
When calculating the number reserved blocks, use floating point for better accuracy, since for big filesystems it really makes a difference. In addition, mke2fs and tune2fs accepts a floating point number from the user, so they should provide that level of accuracy. Addresses-Debian-Bug: #452639 Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-06-07Update tests to reflect undoe2fs -> e2undo renameTheodore Ts'o3-11/+11
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-06-07Fix LIBSS dependency problem for tests/test_icount and lib/ss/test_ssTheodore Ts'o1-1/+1
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-06-02f_extents2: Add new test case testing e2fsck's support for extentsTheodore Ts'o4-0/+78
This test case tests blocks claimed by multiple inodes, as well as other forms of invalid extents. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-05-24Fix m_large_file and r_inline_xattr tests to match with recent changesTheodore Ts'o2-4/+4
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-04-27Add test cases for undoe2fs: u_undoe2fs_mke2fs and u_undoe2fs_tune2fsAneesh Kumar K.V3-0/+71
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-04-27Fix the resize inode test caseAneesh Kumar K.V1-0/+2
With the new mke2fs changes the output of the command differs if we run mke2fs on a device that already have the file system. So erase the file system before running mke2fs so that output remain as expected. Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-04-27Merge branch 'maint'Theodore Ts'o4-280/+122
Conflicts: tests/m_raid_opt/expect.1
2008-04-27mke2fs: Don't allow the combination of the meta_bg and resize_inode featuresTheodore Ts'o4-269/+122
The combination of meta_bg and resize_inode leads to a corrupt filesystem, and it's not really clear it makes any logical sense. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-04-20Remove LAZY_BG featureTheodore Ts'o4-332/+0
This simplifies the code, and using the uninit_bg with the inode table lazily initialized is just as good. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-04-20libe2p: Print the s_min_extra_isize and s_wanted_extra_isize fieldsTheodore Ts'o11-16/+18
Make dumpe2fs and debugfs print out the s_min_extra_isize and s_wanted_extra_isize fields from the superblock. Update tests expect files as appropriate. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-04-17Rename the feature uninit_groups to uninit_bgTheodore Ts'o3-4/+4
Allow the old name of uninit_groups when converting feature names for backwards compatibility for scripts running mke2fs and tune2fs. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-04-06New mke2fs filesystem and usage types supportTheodore Ts'o2-3/+6
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-06Merge branch 'maint' into nextTheodore Ts'o2-9/+111