From: Eric Whitney <enwlinux@gmail.com>
To: fstests@vger.kernel.org
Cc: linux-ext4@vger.kernel.org
Subject: [PATCH] ext4/271: improve mkfs and mount error handling
Date: Thu, 2 Oct 2014 16:32:48 -0400 [thread overview]
Message-ID: <20141002203248.GB2364@wallace> (raw)
If 271's attempt to make a scratch device fails, it can inadvertently
mount and run on a pre-existing scratch file system. This can lead to
invalid test results unless the mkfs failure is separately noted in
271.full.
Noted while debugging an ext4 inline data test failure. Small ext4 file
systems, as used by this test, use small inodes that are incompatible
with inline data.
Signed-off-by: Eric Whitney <enwlinux@gmail.com>
---
tests/ext4/271 | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/tests/ext4/271 b/tests/ext4/271
index e77ae57..44d9147 100755
--- a/tests/ext4/271
+++ b/tests/ext4/271
@@ -41,11 +41,14 @@ _supported_os Linux
_need_to_be_root
_require_scratch
-_scratch_mkfs_sized $((128 * 1024 * 1024)) >> $seqres.full 2>&1
+rm -f $seqres.full
+
+_scratch_mkfs_sized $((128 * 1024 * 1024)) >> $seqres.full 2>&1 \
+ || _fail "mkfs failed"
# -onoload and EXT4_SYNC_FL on file is important becase result in
# metadata sync writes inside ext4_handle_dirty_metadata()
-_scratch_mount -onoload
+_scratch_mount -onoload >> $seqres.full 2>&1 || _fail "mount failed"
touch $SCRATCH_MNT/file
chattr +S $SCRATCH_MNT/file
# Create sparse file
--
1.9.1
reply other threads:[~2014-10-02 20:32 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20141002203248.GB2364@wallace \
--to=enwlinux@gmail.com \
--cc=fstests@vger.kernel.org \
--cc=linux-ext4@vger.kernel.org \
/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).