summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2020-03-14 23:24:39 -0400
committerTheodore Ts'o <tytso@mit.edu>2020-03-14 23:24:39 -0400
commiteb88b751745b5e6b39ddfa2196b5efa9a25535a9 (patch)
tree9c8304e6d7aaa260ee7e80eedc6d542049d85a28 /tests
parent6e315c931fdbce55e76bfbdb8f18fa9e59ca48a2 (diff)
downloade2fsprogs-eb88b751745b5e6b39ddfa2196b5efa9a25535a9.tar.gz
libext2fs: make ext2fs_dirent_has_tail() more strict
Previously ext2fs_dirent_has_tail() would return true if the directory was corrupted. If the directory is corrupted, then by definition it doesn't have a valid checksum tail. (This fixes a big-endian failure on the master branch.) Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'tests')
-rw-r--r--tests/f_dir_bad_csum/expect.18
-rw-r--r--tests/f_rebuild_csum_rootdir/expect.13
-rw-r--r--tests/f_resize_inode_meta_bg/expect.19
3 files changed, 7 insertions, 13 deletions
diff --git a/tests/f_dir_bad_csum/expect.1 b/tests/f_dir_bad_csum/expect.1
index 94e72daa..2c684fe6 100644
--- a/tests/f_dir_bad_csum/expect.1
+++ b/tests/f_dir_bad_csum/expect.1
@@ -9,21 +9,15 @@ Fix? yes
Directory inode 14, block #0, offset 0: directory has no checksum.
Fix? yes
-Directory inode 15, block #0, offset 0: directory has no checksum.
-Fix? yes
-
Directory inode 15, block #0, offset 1000: directory corrupted
Salvage? yes
-Directory inode 16, block #0, offset 0: directory has no checksum.
+Entry '' in ??? (15) has rec_len of 0, should be 12.
Fix? yes
Directory inode 16, block #0, offset 12: directory corrupted
Salvage? yes
-Directory inode 17, block #0, offset 0: directory has no checksum.
-Fix? yes
-
Directory inode 17, block #0, offset 0: directory corrupted
Salvage? yes
diff --git a/tests/f_rebuild_csum_rootdir/expect.1 b/tests/f_rebuild_csum_rootdir/expect.1
index 4df58f91..bab07e05 100644
--- a/tests/f_rebuild_csum_rootdir/expect.1
+++ b/tests/f_rebuild_csum_rootdir/expect.1
@@ -1,8 +1,5 @@
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
-Directory inode 2, block #0, offset 0: directory has no checksum.
-Fix? yes
-
Directory inode 2, block #0, offset 0: directory corrupted
Salvage? yes
diff --git a/tests/f_resize_inode_meta_bg/expect.1 b/tests/f_resize_inode_meta_bg/expect.1
index 12055fc7..c733c18d 100644
--- a/tests/f_resize_inode_meta_bg/expect.1
+++ b/tests/f_resize_inode_meta_bg/expect.1
@@ -5,9 +5,6 @@ Resize_inode not enabled, but the resize inode is non-zero. Clear? yes
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
-Directory inode 2, block #0, offset 0: directory has no checksum.
-Fix? yes
-
First entry '' (inode=348) in directory inode 2 (???) should be '.'
Fix? yes
@@ -19,6 +16,9 @@ Setting filetype for entry '..' in ??? (2) to 2.
Directory inode 2, block #0, offset 860: directory corrupted
Salvage? yes
+Entry '' in ??? (2) has rec_len of 0, should be 12.
+Fix? yes
+
Directory inode 11, block #0, offset 0: directory corrupted
Salvage? yes
@@ -42,6 +42,9 @@ Clear? yes
Directory inode 11, block #3, offset 864: directory corrupted
Salvage? yes
+Entry '' in ??? (11) has rec_len of 0, should be 12.
+Fix? yes
+
Pass 3: Checking directory connectivity
'..' in / (2) is <The NULL inode> (0), should be / (2).
Fix? yes