From: Jan Kara <jack@suse.cz>
To: fstests@vger.kernel.org
Cc: Jan Kara <jack@suse.cz>
Subject: [PATCH 5/6] ext4/010: Fixup resize2fs and dumpe2fs usage
Date: Tue, 29 May 2018 18:56:00 +0200 [thread overview]
Message-ID: <20180529165601.32133-6-jack@suse.cz> (raw)
In-Reply-To: <20180529165601.32133-1-jack@suse.cz>
Use $RESIZE2FS_PROG and $DUMPE2FS_PROG instead of names directly to make
progs be executed with full path. Also add proper feature test macros.
Signed-off-by: Jan Kara <jack@suse.cz>
---
tests/ext4/010 | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/tests/ext4/010 b/tests/ext4/010
index c877bd7af43f..37ba2aaa7c85 100755
--- a/tests/ext4/010
+++ b/tests/ext4/010
@@ -47,8 +47,10 @@ _supported_fs ext4
_supported_os Linux
_require_scratch
+_require_dumpe2fs
test -n "${FORCE_FUZZ}" || _require_scratch_ext4_crc
_require_attrs
+_require_command "$RESIZE2FS_PROG" resize2fs
rm -f $seqres.full
TESTDIR="${SCRATCH_MNT}/scratchdir"
@@ -56,9 +58,9 @@ TESTFILE="${TESTDIR}/testfile"
echo "+ create scratch fs"
_scratch_mkfs_ext4 > /dev/null 2>&1
-dumpe2fs -g "${SCRATCH_DEV}" > /dev/null 2>&1 || _notrun "dumpe2fs -g not supported"
-resize2fs -M "${SCRATCH_DEV}" >> $seqres.full 2>&1
-nr_groups="$(dumpe2fs -g "${SCRATCH_DEV}" 2> /dev/null | tail -n 1 | cut -d : -f 1)"
+$DUMPE2FS_PROG -g "${SCRATCH_DEV}" > /dev/null 2>&1 || _notrun "dumpe2fs -g not supported"
+$RESIZE2FS_PROG -M "${SCRATCH_DEV}" >> $seqres.full 2>&1
+nr_groups="$($DUMPE2FS_PROG -g "${SCRATCH_DEV}" 2> /dev/null | tail -n 1 | cut -d : -f 1)"
echo "+ mount fs image"
_scratch_mount
@@ -74,7 +76,7 @@ echo "+ check fs"
e2fsck -fn "${SCRATCH_DEV}" >> $seqres.full 2>&1 || _fail "fsck should not fail"
echo "+ corrupt image"
-dumpe2fs -g "${SCRATCH_DEV}" 2>/dev/null | awk -F ':' '{if (int($6) > 0) {print $6}}' | while read blk; do
+$DUMPE2FS_PROG -g "${SCRATCH_DEV}" 2>/dev/null | awk -F ':' '{if (int($6) > 0) {print $6}}' | while read blk; do
debugfs -w -n -R "zap_block ${blk}" "${SCRATCH_DEV}" >> $seqres.full 2>&1 || _fail "inode bitmap fuzz failed"
done
--
2.13.6
next prev parent reply other threads:[~2018-05-29 16:56 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-29 16:55 [PATCH 0/6] ext4: Test for resize overflow Jan Kara
2018-05-29 16:55 ` [PATCH 1/6] dmhugedisk: Allow specifying of chunk size Jan Kara
2018-05-29 16:55 ` [PATCH 2/6] ext4: Test for s_inodes_count overflow during fs resize Jan Kara
2018-05-29 16:55 ` [PATCH 3/6] xfs/310: Cleanup Jan Kara
2018-05-29 22:01 ` Dave Chinner
2018-05-29 16:55 ` [PATCH 4/6] ext4/032: Fix up resize2fs usage Jan Kara
2018-05-29 16:56 ` Jan Kara [this message]
2018-05-29 16:56 ` [PATCH 6/6] ext4/306: Fixup " Jan Kara
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=20180529165601.32133-6-jack@suse.cz \
--to=jack@suse.cz \
--cc=fstests@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