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 13/19] tests: add regression tests for EA blocks with bad checksums
Date: Fri, 01 Aug 2014 11:13:07 -0700	[thread overview]
Message-ID: <20140801181307.12496.76118.stgit@birch.djwong.org> (raw)
In-Reply-To: <20140801181139.12496.14390.stgit@birch.djwong.org>

From: Darrick J. Wong <darrick.wong@oracle.com>

Add regression tests for e2fsck dealing with (a) EA block with a bad
checksum; (b) EA block with a bad magic number; and (c) EA block with
damage that isn't otherwise noticeable.

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

diff --git a/tests/f_ea_bad_csum/expect.1 b/tests/f_ea_bad_csum/expect.1
new file mode 100644
index 0000000..4fc365f
--- /dev/null
+++ b/tests/f_ea_bad_csum/expect.1
@@ -0,0 +1,29 @@
+Pass 1: Checking inodes, blocks, and sizes
+Inode 12 has a bad extended attribute block 1074.  Clear? yes
+
+Inode 12, i_blocks is 2, should be 0.  Fix? yes
+
+Extended attribute in inode 13 has a hash (1631637196) which is invalid
+Clear? yes
+
+Inode 13, i_blocks is 2, should be 0.  Fix? yes
+
+Inode 14 extended attribute block 1076 passes checks, but checksum does not match block.  Fix? yes
+
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+Block bitmap differences:  -(1074--1075)
+Fix? yes
+
+Free blocks count wrong for group #0 (971, counted=973).
+Fix? yes
+
+Free blocks count wrong (971, counted=973).
+Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 14/128 files (7.1% non-contiguous), 1075/2048 blocks
+Exit status is 1
diff --git a/tests/f_ea_bad_csum/expect.2 b/tests/f_ea_bad_csum/expect.2
new file mode 100644
index 0000000..d83fdfb
--- /dev/null
+++ b/tests/f_ea_bad_csum/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: 14/128 files (7.1% non-contiguous), 1075/2048 blocks
+Exit status is 0
diff --git a/tests/f_ea_bad_csum/image.gz b/tests/f_ea_bad_csum/image.gz
new file mode 100644
index 0000000000000000000000000000000000000000..e7a25c512feec33336f18ef0954737e91003269c
GIT binary patch
literal 3176
zcmeIy`&ZHj6aa8qEzO-1Zh53>rA*T$X)MiYK1k1*uSB#`o0_HtElpXH(nKSB=?SL`
z^HFMym71Aa<fAmC5_S1DQFMS53>XSBGDRNW?{}X4*1yp4{&3H|Ki<!|_uA3SVc8D+
z!=J5Ji^Q}e(c57El1>H1#}20-_D}}IGKx%(Q2~yvHtdkES~nnVe8#T7S+HnCeU7vZ
zg981&&EN2)jpGe?_fNI#hh5)9`Il{=vkqAp?023~j0nfil06$;>qS8B+aW)9ozR=4
z5o(@c<g@NbnET`b!<gl(Vy~@31!IVU(5!sC>}I*`>1We7>Ku!TvlDP(vSzNL?2j^~
zoS^AK*0p3JRW4V?GVdGTSCJA|lmIa)L%6u4YbgP?rRC)4A}(ZD7g1`NE}S_P*fdy@
z;hmkUtXW?Z+}XS{lu}uNDmkdQt0nkbJs421W^e^1eXV=z>MAq1vepIyfR!eOrrvbn
zBFNScDLlS_!)878-W;Ej>e@?9O5hKo<jcLHdc&)SrCYF+l*P%Oa(mdvVe$!r5Z1i3
zWwW5<j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TnTJe4-aI^z40pxFzLeJIzKb|MsK6$vc
W0oMdRZ2`h{3@q4p;W7+n5Bm?Qd!Nbx

literal 0
HcmV?d00001

diff --git a/tests/f_ea_bad_csum/name b/tests/f_ea_bad_csum/name
new file mode 100644
index 0000000..958b244
--- /dev/null
+++ b/tests/f_ea_bad_csum/name
@@ -0,0 +1 @@
+EA block with bad checksum (metadata_csum)


  parent reply	other threads:[~2014-08-01 18:13 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-01 18:11 [PATCH 00/19] e2fsprogs patchbomb 7/14, part 2.1 Darrick J. Wong
2014-08-01 18:11 ` [PATCH 01/19] e2fuzz: fix fs handle cleanup when closing fails Darrick J. Wong
2014-08-03  2:22   ` Theodore Ts'o
2014-08-01 18:11 ` [PATCH 02/19] e2fsck: never free critical metadata blocks in the block found map Darrick J. Wong
2014-08-03  2:22   ` Theodore Ts'o
2014-08-01 18:11 ` [PATCH 03/19] e2fsck: use root dir for lost+found when really desperate Darrick J. Wong
2014-08-03  2:25   ` Theodore Ts'o
2014-08-05  0:58     ` Darrick J. Wong
2014-08-05  2:06       ` Theodore Ts'o
2014-08-01 18:12 ` [PATCH 04/19] dumpe2fs: complain when checksum verification fails Darrick J. Wong
2014-08-03  2:26   ` Theodore Ts'o
2014-08-01 18:12 ` [PATCH 05/19] libext2fs: check EA block headers when reading in the block Darrick J. Wong
2014-08-03  2:33   ` Theodore Ts'o
2014-08-01 18:12 ` [PATCH 06/19] e2fsck: try to salvage extent blocks with bad checksums Darrick J. Wong
2014-08-03  2:33   ` Theodore Ts'o
2014-08-01 18:12 ` [PATCH 07/19] e2fsck: try to salvage corrupt directory entry blocks Darrick J. Wong
2014-08-03  2:33   ` Theodore Ts'o
2014-08-01 18:12 ` [PATCH 08/19] e2fsck: offer to clear inode table blocks that are insane Darrick J. Wong
2014-08-03  2:46   ` Theodore Ts'o
2014-08-01 18:12 ` [PATCH 09/19] e2fsck: correctly preserve fs flags when modifying ignore-csum-error flag Darrick J. Wong
2014-08-03  2:48   ` Theodore Ts'o
2014-08-01 18:12 ` [PATCH 10/19] libext2fs: Don't cache inodes that fail checksum verification Darrick J. Wong
2014-08-03  2:50   ` Theodore Ts'o
2014-08-01 18:12 ` [PATCH 11/19] e2fsck: disable checksum verification in a few select places Darrick J. Wong
2014-08-03  2:51   ` Theodore Ts'o
2014-08-01 18:13 ` [PATCH 12/19] e2fsck: always ask to fix an inode that fails checksum verification Darrick J. Wong
2014-08-03  2:55   ` Theodore Ts'o
2014-08-01 18:13 ` Darrick J. Wong [this message]
2014-08-03  3:42   ` [PATCH 13/19] tests: add regression tests for EA blocks with bad checksums Theodore Ts'o
2014-08-01 18:13 ` [PATCH 14/19] tests: add tests for handling of corrupt extents Darrick J. Wong
2014-08-03  3:47   ` Theodore Ts'o
2014-08-01 18:13 ` [PATCH 15/19] tests: add tests for directory entry blocks with checksum errors Darrick J. Wong
2014-08-03  3:49   ` Theodore Ts'o
2014-08-01 18:13 ` [PATCH 16/19] tests: add regression tests for MMP blocks with bad checksums Darrick J. Wong
2014-08-03  3:49   ` Theodore Ts'o
2014-08-01 18:13 ` [PATCH 17/19] tests: add regression tests for superblocks " Darrick J. Wong
2014-08-03  3:50   ` Theodore Ts'o
2014-08-01 18:13 ` [PATCH 18/19] tests: add regression tests for group descriptors " Darrick J. Wong
2014-08-03  3:51   ` Theodore Ts'o
2014-08-01 18:13 ` [PATCH 19/19] tests: add regression tests for inodes " Darrick J. Wong
2014-08-03  3:52   ` Theodore Ts'o

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=20140801181307.12496.76118.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).