summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2010-06-07 12:42:40 -0400
committerTheodore Ts'o <tytso@mit.edu>2010-06-07 12:42:40 -0400
commit97d26ce9e3589e9f5fa17014467a9730a884d158 (patch)
tree1321a9170832aebc6c5017a70d6d73957cf31ba4 /tests
parentc561e751a17c85b898d74f8cc16daad5f29500a4 (diff)
parent296b9d696ab491f29d6d2083982e39b0ff3dab1f (diff)
downloade2fsprogs-97d26ce9e3589e9f5fa17014467a9730a884d158.tar.gz
Merge branch 'maint' into next
Conflicts: e2fsck/journal.c e2fsck/pass1.c e2fsck/pass2.c misc/mke2fs.c
Diffstat (limited to 'tests')
-rw-r--r--tests/Makefile.in4
-rw-r--r--tests/f_bad_disconnected_inode/expect.19
-rw-r--r--tests/f_unused_itable/expect.131
-rw-r--r--tests/f_unused_itable/expect.27
-rw-r--r--tests/f_unused_itable/image.gzbin0 -> 2310 bytes
-rw-r--r--tests/f_unused_itable/name1
-rw-r--r--tests/mke2fs.conf.in44
7 files changed, 94 insertions, 2 deletions
diff --git a/tests/Makefile.in b/tests/Makefile.in
index 36590872..148813e9 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -23,8 +23,8 @@ test_script: test_script.in Makefile mke2fs.conf
@cat $(srcdir)/test_script.in >> test_script
@chmod +x test_script
-mke2fs.conf: $(srcdir)/../misc/mke2fs.conf
- sed -e 's/blocksize = -1/blocksize = 4096/' $(srcdir)/../misc/mke2fs.conf >mke2fs.conf
+mke2fs.conf: $(srcdir)/mke2fs.conf.in
+ $(CP) $(srcdir)/mke2fs.conf.in mke2fs.conf
check:: test_script
@echo "Running e2fsprogs test suite..."
diff --git a/tests/f_bad_disconnected_inode/expect.1 b/tests/f_bad_disconnected_inode/expect.1
index 1b233e78..b1bfca59 100644
--- a/tests/f_bad_disconnected_inode/expect.1
+++ b/tests/f_bad_disconnected_inode/expect.1
@@ -2,12 +2,21 @@ Pass 1: Checking inodes, blocks, and sizes
Inode 1 has EXTENTS_FL flag set on filesystem without extents support.
Clear? yes
+Inode 9 should not have EOFBLOCKS_FL set (size 0, lblk -1)
+Clear? yes
+
+Inode 10 should not have EOFBLOCKS_FL set (size 0, lblk -1)
+Clear? yes
+
Inode 15 has EXTENTS_FL flag set on filesystem without extents support.
Clear? yes
Inode 16 has EXTENTS_FL flag set on filesystem without extents support.
Clear? yes
+Inode 13 should not have EOFBLOCKS_FL set (size 0, lblk -1)
+Clear? yes
+
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
/lost+found not found. Create? yes
diff --git a/tests/f_unused_itable/expect.1 b/tests/f_unused_itable/expect.1
new file mode 100644
index 00000000..d77e82a5
--- /dev/null
+++ b/tests/f_unused_itable/expect.1
@@ -0,0 +1,31 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Entry 'foo' in / (2) references inode 65 found in group 1's unused inodes area.
+Fix? yes
+
+Entry '1' in / (2) references inode 12 found in group 0's unused inodes area.
+Fix? yes
+
+Restarting e2fsck from the beginning...
+One or more block group descriptor checksums are invalid. Fix? yes
+
+Group descriptor 0 checksum is invalid. FIXED.
+Group descriptor 1 checksum is invalid. FIXED.
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+Free inodes count wrong for group #0 (53, counted=51).
+Fix? yes
+
+Free inodes count wrong for group #1 (64, counted=58).
+Fix? yes
+
+Free inodes count wrong (117, counted=109).
+Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 19/128 files (0.0% non-contiguous), 165/1000 blocks
+Exit status is 1
diff --git a/tests/f_unused_itable/expect.2 b/tests/f_unused_itable/expect.2
new file mode 100644
index 00000000..b79d3180
--- /dev/null
+++ b/tests/f_unused_itable/expect.2
@@ -0,0 +1,7 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 19/128 files (0.0% non-contiguous), 165/1000 blocks
+Exit status is 0
diff --git a/tests/f_unused_itable/image.gz b/tests/f_unused_itable/image.gz
new file mode 100644
index 00000000..ca93e987
--- /dev/null
+++ b/tests/f_unused_itable/image.gz
Binary files differ
diff --git a/tests/f_unused_itable/name b/tests/f_unused_itable/name
new file mode 100644
index 00000000..39b68d64
--- /dev/null
+++ b/tests/f_unused_itable/name
@@ -0,0 +1 @@
+Invalid bg_unused_itable shouldn't move files to lost+found
diff --git a/tests/mke2fs.conf.in b/tests/mke2fs.conf.in
new file mode 100644
index 00000000..34539fa5
--- /dev/null
+++ b/tests/mke2fs.conf.in
@@ -0,0 +1,44 @@
+[defaults]
+ base_features = sparse_super,filetype,resize_inode,dir_index,ext_attr
+ blocksize = 4096
+ inode_size = 256
+ inode_ratio = 16384
+
+[fs_types]
+ ext3 = {
+ features = has_journal
+ }
+ ext4 = {
+ features = has_journal,extent,huge_file,flex_bg,uninit_bg,dir_nlink,extra_isize
+ inode_size = 256
+ }
+ ext4dev = {
+ features = has_journal,extent,huge_file,flex_bg,uninit_bg,dir_nlink,extra_isize
+ inode_size = 256
+ options = test_fs=1
+ }
+ small = {
+ blocksize = 1024
+ inode_size = 128
+ inode_ratio = 4096
+ }
+ floppy = {
+ blocksize = 1024
+ inode_size = 128
+ inode_ratio = 8192
+ }
+ news = {
+ inode_ratio = 4096
+ }
+ largefile = {
+ inode_ratio = 1048576
+ blocksize = 4096
+ }
+ largefile4 = {
+ inode_ratio = 4194304
+ blocksize = 4096
+ }
+ hurd = {
+ blocksize = 4096
+ inode_size = 128
+ }