From: Eric Sandeen <sandeen@redhat.com>
To: xfs-oss <xfs@oss.sgi.com>, linux-btrfs <linux-btrfs@vger.kernel.org>
Subject: [PATCH] xfstests: enable test 032 (mkfs overwrite) for btrfs
Date: Wed, 13 Mar 2013 11:01:00 -0500 [thread overview]
Message-ID: <5140A2BC.7010800@redhat.com> (raw)
Now that btrfs has an "-f" arg, we can test that it doesn't
improperly overwrite other filesystems in 032 like we do
for xfs.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---
diff --git a/032 b/032
index bf88492..89fb225 100755
--- a/032
+++ b/032
@@ -38,12 +38,18 @@ rm -f $seq.full
. ./common.filter
# real QA test starts here
-_supported_fs xfs
+_supported_fs xfs btrfs
_supported_os Linux
_require_nobigloopfs
_require_scratch
+# mkfs.btrfs did not have overwrite detection at first
+if [ "$FSTYP" == "btrfs" ]; then
+ grep -q 'force overwrite' `echo $MKFS_BTRFS_PROG | awk '{print $1}'` || \
+ _notrun "Installed mkfs.btrfs does not support -f option"
+fi
+
echo "Silence is golden."
for fs in `echo ${MKFS_PROG}.* | sed -e 's/.sbin.mkfs.//g'`
do
@@ -61,7 +67,7 @@ do
[ $fs = gfs2 ] && preop="echo y |" && preargs="-p lock_nolock -j 1"
[ $fs = reiserfs ] && preop="echo y |" && preargs="-f"
# cramfs mkfs requires a directory argument
- [ $fs = cramfs ] && preargs=/proc/fs/xfs
+ [ $fs = cramfs ] && preargs=/proc/fs
[ $fs = ext2 ] && preargs="-F"
[ $fs = ext3 ] && preargs="-F"
[ $fs = ext4 ] && preargs="-F"
@@ -77,8 +83,8 @@ do
if [ $? -eq 0 ] ; then
# next, ensure we don't overwrite it
- echo "=== Attempting XFS overwrite of $fs..." >>$seq.full
- ${MKFS_PROG}.xfs $SCRATCH_DEV >>$seq.full 2>&1
+ echo "=== Attempting $FSTYP overwrite of $fs..." >>$seq.full
+ ${MKFS_PROG}.$FSTYP $SCRATCH_DEV >>$seq.full 2>&1
[ $? -eq 0 ] && echo "Failed - overwrote fs type ${fs}!"
else
next reply other threads:[~2013-03-13 16:01 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-13 16:01 Eric Sandeen [this message]
2013-03-15 17:07 ` [PATCH] xfstests: enable test 032 (mkfs overwrite) for btrfs Rich Johnston
2013-03-15 17:12 ` Eric Sandeen
2013-03-16 12:14 ` Linda Walsh
2013-03-15 17:11 ` Rich Johnston
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=5140A2BC.7010800@redhat.com \
--to=sandeen@redhat.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=xfs@oss.sgi.com \
/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).