linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: tytso@mit.edu, darrick.wong@oracle.com
Cc: linux-ext4@vger.kernel.org
Subject: [PATCH 21/21] tests: add regression tests for inlinedata fixes
Date: Mon, 04 Aug 2014 18:07:16 -0700	[thread overview]
Message-ID: <20140805010716.2611.99727.stgit@birch.djwong.org> (raw)
In-Reply-To: <20140805010457.2611.89813.stgit@birch.djwong.org>

Add a regression test to ensure that previous patches' fixes to e2fsck
do not revert.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
---
 tests/f_inlinedata_repair/expect.1 |   78 ++++++++++++++++++++++++++++++++++++
 tests/f_inlinedata_repair/expect.2 |   33 +++++++++++++++
 tests/f_inlinedata_repair/image.gz |  Bin
 tests/f_inlinedata_repair/name     |    1 
 4 files changed, 112 insertions(+)
 create mode 100644 tests/f_inlinedata_repair/expect.1
 create mode 100644 tests/f_inlinedata_repair/expect.2
 create mode 100644 tests/f_inlinedata_repair/image.gz
 create mode 100644 tests/f_inlinedata_repair/name


diff --git a/tests/f_inlinedata_repair/expect.1 b/tests/f_inlinedata_repair/expect.1
new file mode 100644
index 0000000..a91ce76
--- /dev/null
+++ b/tests/f_inlinedata_repair/expect.1
@@ -0,0 +1,78 @@
+Pass 1: Checking inodes, blocks, and sizes
+Inode 12 has INLINE_DATA_FL flag but extended attribute not found.  Truncate? yes
+
+Inode 16, i_size is 56, should be 60.  Fix? yes
+
+Inode 24, i_size is 59, should be 60.  Fix? yes
+
+Inode 28 is a unknown file type with mode 00 but it looks like it is really a directory.
+Fix? yes
+
+Inode 36 is a unknown file type with mode 00 but it looks like it is really a directory.
+Fix? yes
+
+Inode 36, i_size is 5, should be 60.  Fix? yes
+
+Pass 2: Checking directory structure
+Directory inode 20, block #0, offset 4: directory corrupted
+Salvage? yes
+
+Directory inode 28, block #0, offset 4: directory corrupted
+Salvage? yes
+
+Directory inode 32, block #0, offset 4: directory corrupted
+Salvage? yes
+
+Directory inode 32, block #0, offset 4: directory corrupted
+Salvage? yes
+
+Entry '..' in ??? (36) has invalid inode #: 1633774699.
+Clear? yes
+
+Directory inode 36, block #0, offset 4: directory corrupted
+Salvage? yes
+
+Symlink /1 (inode #12) is invalid.
+Clear? yes
+
+Symlink /3 (inode #14) is invalid.
+Clear? yes
+
+Inode 38 (/B) has invalid mode (00).
+Clear? yes
+
+Entry 'A' in / (2) has an incorrect filetype (was 1, should be 2).
+Fix? yes
+
+Pass 3: Checking directory connectivity
+'..' in /A (36) is ??? (1633774699), should be / (2).
+Fix? yes
+
+Error while adjusting inode count on inode 0
+Pass 4: Checking reference counts
+Unattached zero-length inode 22.  Clear? yes
+
+Unattached zero-length inode 23.  Clear? yes
+
+Unattached zero-length inode 29.  Clear? yes
+
+Unattached zero-length inode 30.  Clear? yes
+
+Unattached zero-length inode 31.  Clear? yes
+
+Unattached zero-length inode 33.  Clear? yes
+
+Unattached zero-length inode 34.  Clear? yes
+
+Unattached zero-length inode 35.  Clear? yes
+
+Inode 36 ref count is 1, should be 2.  Fix? yes
+
+Pass 5: Checking group summary information
+Directories count wrong for group #0 (7, counted=8).
+Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 27/128 files (0.0% non-contiguous), 18/512 blocks
+Exit status is 1
diff --git a/tests/f_inlinedata_repair/expect.2 b/tests/f_inlinedata_repair/expect.2
new file mode 100644
index 0000000..941241d
--- /dev/null
+++ b/tests/f_inlinedata_repair/expect.2
@@ -0,0 +1,33 @@
+Pass 1: Checking inodes, blocks, and sizes
+Inode 20, i_size is 60, should be 0.  Fix? yes
+
+Inode 28, i_size is 60, should be 0.  Fix? yes
+
+Inode 32, i_size is 60, should be 0.  Fix? yes
+
+Inode 36, i_size is 60, should be 0.  Fix? yes
+
+Pass 2: Checking directory structure
+Directory inode 20 has an unallocated block #0.  Allocate? yes
+
+Directory inode 28 has an unallocated block #0.  Allocate? yes
+
+Directory inode 32 has an unallocated block #0.  Allocate? yes
+
+Directory inode 36 has an unallocated block #0.  Allocate? yes
+
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Unattached zero-length inode 21.  Clear? yes
+
+Pass 5: Checking group summary information
+Free blocks count wrong for group #0 (494, counted=490).
+Fix? yes
+
+Free blocks count wrong (494, counted=490).
+Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 26/128 files (0.0% non-contiguous), 22/512 blocks
+Exit status is 1
diff --git a/tests/f_inlinedata_repair/image.gz b/tests/f_inlinedata_repair/image.gz
new file mode 100644
index 0000000000000000000000000000000000000000..c33d81dc60f828c89c9b743e64e0b9cf4224da1f
GIT binary patch
literal 3201
zcmeH}TToMX5XOV3SS*O*jEG_=Sfruc3K|e0RjE{iqQyW6AO%r`D1m}NDR8{uSS&JA
z>J5PmD#aMWCEN|+R4qmWns#Cg;6Nymq(IU@0*Qy5oPXm>-<)y!oPF8-cD|jR`OQ8o
z{_+akvzp=PCD!Uu^2x&#C!5&-v0KO5vNL66=O&KsT;dt#>b%s^eUBqOqiFnch84cO
zoYt{?ooAIpqQfrg>J+~<u|DO_cigyHM-#g5hxcE-7@pYTx~H=6MNLSuXX*M8ns87f
zEz;FYMJn}>rut?`7cqUsmv=^f_9^=$Va;o1slzLU%vW)BG?~oex1_b?xW+^~IZvZ(
zhl$b0t3sBC3{+5_8rxB!cF4YW{UgQD^^N@RP5F2Zrd1PTRan;Z3XL5Iy*59u2eP<Z
zV<hO$vq#zXr@S-!Kp$TR`(B{bai|YCUkD0ru7hpei{Ri_HMNB}T=lYaLw-ynn`;6c
z$r+vbH10OlSel&`4)<FR<6eC*`a19;(*}pbdGO~Ap!1-ok9~cP)yS^a?t<*8jbp)e
z9o;NVJ@(ax#UuZy4|E+f)D#x0#JV}VR?$<zKng=7AU+8TfK<1*0zx_CN^xdb-=}wT
zQpxh%rrC2vy>5CsS^mg{yt{ilzWIu&it3_{wjK2~%=ap0?aW(WrjC3T2DZ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inlinedata_repair/name b/tests/f_inlinedata_repair/name
new file mode 100644
index 0000000..7e7e898
--- /dev/null
+++ b/tests/f_inlinedata_repair/name
@@ -0,0 +1 @@
+repair corrupt inline data files


  parent reply	other threads:[~2014-08-05  1:07 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-05  1:04 [PATCH 00/21] e2fsprogs Summer 2014 patchbomb, part 3 Darrick J. Wong
2014-08-05  1:05 ` [PATCH 01/21] e2fuzz: fix build problems on macosx and i386 linux Darrick J. Wong
2014-08-10 22:16   ` Theodore Ts'o
2014-08-05  1:05 ` [PATCH 02/21] e2fsck: convert 'delete files' warning to a proper fix_problem error Darrick J. Wong
2014-08-10 22:16   ` Theodore Ts'o
2014-08-05  1:05 ` [PATCH 03/21] libext2fs: check EA value offset Darrick J. Wong
2014-08-10 22:21   ` Theodore Ts'o
2014-08-05  1:05 ` [PATCH 04/21] libext2fs/e2fsck: don't run off the end of the EA block Darrick J. Wong
2014-08-10 22:22   ` Theodore Ts'o
2014-08-05  1:05 ` [PATCH 05/21] misc: fix various endianness problems with inline_data Darrick J. Wong
2014-08-10 22:23   ` Theodore Ts'o
2014-08-05  1:05 ` [PATCH 06/21] libext2fs: strict inline data overwrite should not return ENOSPC Darrick J. Wong
2014-08-10 22:27   ` Theodore Ts'o
2014-08-05  1:05 ` [PATCH 07/21] libext2fs: remove EA when inline data is less than 60 bytes Darrick J. Wong
2014-08-08 22:46   ` [PATCH v2 07/21] libext2fs: don't fail inline data operations if there's no EA Darrick J. Wong
2014-08-10 22:31     ` Theodore Ts'o
2014-08-05  1:05 ` [PATCH 08/21] libext2fs: fix memory leak when failing to iterate inline_data directory Darrick J. Wong
2014-08-10 22:32   ` Theodore Ts'o
2014-08-05  1:05 ` [PATCH 09/21] e2fsck: check ea-in-inode regions for overlap Darrick J. Wong
2014-08-08 22:43   ` [PATCH v2 " Darrick J. Wong
2014-08-10 22:35     ` Theodore Ts'o
2014-08-05  1:06 ` [PATCH 10/21] e2fsck: clear inline_data inode flag if EA missing Darrick J. Wong
2014-08-08 22:44   ` [PATCH v2 " Darrick J. Wong
2014-08-10 22:37     ` Theodore Ts'o
2014-08-05  1:06 ` [PATCH 11/21] e2fsck: handle inline data symlinks Darrick J. Wong
2014-08-10 22:38   ` Theodore Ts'o
2014-08-05  1:06 ` [PATCH 12/21] e2fsck: check inline directory data "block" first Darrick J. Wong
2014-08-10 22:40   ` Theodore Ts'o
2014-08-05  1:06 ` [PATCH 13/21] e2fsck: don't try to iterate blocks of an inline_data inode when deallocating it Darrick J. Wong
2014-08-10 22:40   ` Theodore Ts'o
2014-08-05  1:06 ` [PATCH 14/21] e2fsck: clear extents and inline_data flags from fifo/socket/device inodes Darrick J. Wong
2014-08-10 22:41   ` Theodore Ts'o
2014-08-05  1:06 ` [PATCH 15/21] e2fsck: fix conflicting extents|inlinedata inode flags Darrick J. Wong
2014-08-08 16:24   ` [PATCH v2 " Darrick J. Wong
2014-08-10 22:43     ` Theodore Ts'o
2014-08-05  1:06 ` [PATCH 16/21] e2fsck: do a better job of fixing i_size of inline directories Darrick J. Wong
2014-08-10 22:44   ` Theodore Ts'o
2014-08-05  1:06 ` [PATCH 17/21] e2fsck: use the correct block size when salvaging directories Darrick J. Wong
2014-08-10 22:45   ` Theodore Ts'o
2014-08-05  1:06 ` [PATCH 18/21] e2fsck: check inline dir size is a multiple of 4 Darrick J. Wong
2014-08-10 22:47   ` Theodore Ts'o
2014-08-05  1:07 ` [PATCH 19/21] e2fsck: be more careful in assuming inline_data inodes are directories Darrick J. Wong
2014-08-08 16:22   ` [PATCH v2 " Darrick J. Wong
2014-08-10 22:49     ` Theodore Ts'o
2014-08-05  1:07 ` [PATCH 20/21] e2fsck: don't set prev after processing '..' on an inline dir Darrick J. Wong
2014-08-10 22:50   ` Theodore Ts'o
2014-08-05  1:07 ` Darrick J. Wong [this message]
2014-08-08 22:47   ` [PATCH v2 21/21] tests: add regression tests for inlinedata fixes Darrick J. Wong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140805010716.2611.99727.stgit@birch.djwong.org \
    --to=darrick.wong@oracle.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=tytso@mit.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).