From: Jaegeuk Kim <jaegeuk@kernel.org>
To: Dave Chinner <david@fromorbit.com>
Cc: Jaegeuk Kim <jaegeuk@kernel.org>,
fstests@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net
Subject: [PATCH 2/2] f2fs/087: test power failure test using godown
Date: Thu, 8 Jan 2015 10:31:19 -0800 [thread overview]
Message-ID: <1420741879-73691-2-git-send-email-jaegeuk@kernel.org> (raw)
In-Reply-To: <1420741879-73691-1-git-send-email-jaegeuk@kernel.org>
This patch adds f2fs/087 to test power failure by using godown.
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
---
tests/f2fs/087 | 88 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
tests/f2fs/087.out | 21 +++++++++++++
tests/f2fs/group | 1 +
3 files changed, 110 insertions(+)
create mode 100644 tests/f2fs/087
create mode 100644 tests/f2fs/087.out
create mode 100644 tests/f2fs/group
diff --git a/tests/f2fs/087 b/tests/f2fs/087
new file mode 100644
index 0000000..9410b9f
--- /dev/null
+++ b/tests/f2fs/087
@@ -0,0 +1,88 @@
+#! /bin/bash
+# FS QA Test No. 087
+#
+# * use godown likewise xfs/087
+#
+#-----------------------------------------------------------------------
+# Copyright (c) 2015 Jaegeuk Kim
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation.
+#
+# This program is distributed in the hope that it would be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+#
+#-----------------------------------------------------------------------
+#
+
+seq=`basename $0`
+seqres=$RESULT_DIR/$seq
+echo "QA output created by $seq"
+
+here=`pwd`
+tmp=/tmp/$$
+status=1 # failure is the default!
+trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
+
+# get standard environment, filters and checks
+. ./common/rc
+. ./common/filter
+
+# real QA test starts here
+_supported_fs f2fs
+_supported_os Linux
+
+rm -f $seqres.full $tmp.*
+_require_scratch
+
+_run_fsstress()
+{
+ out=$SCRATCH_MNT/fsstress
+ count=$((5000*$i))
+ echo $count
+ param="-p 4 -z -f sync=1 -f write=30 -f rmdir=10 -f link=10 -f creat=10 -f mkdir=10 -f rename=30 -f stat=30 -f unlink=30 -f truncate=20"
+ echo "calling fsstress $param -m8 -n $count" >>$seqres.full
+ FSSTRESS_ARGS=`_scale_fsstress_args $param $FSSTRESS_AVOID -m 8 -n $count -d $out`
+ if ! $FSSTRESS_PROG $FSSTRESS_ARGS >>$seqres.full 2>&1
+ then
+ echo "fsstress failed"
+ fi
+}
+
+# mkfs the FS
+_scratch_mkfs >>$seqres.full 2>&1
+if [ $? -ne 0 ] ; then
+ echo "mkfs failed: $MKFS_OPTIONS"
+fi
+
+i=1
+LOOP=10
+for i in $(seq 1 ${LOOP}); do
+ echo "** mount" >>$seqres.full
+ if ! _scratch_mount >>$seqres.full 2>&1; then
+ echo "mount failed: $MOUNT_OPTIONS"
+ fi
+
+ _run_fsstress
+
+ echo "** godown" >>$seqres.full
+ src/godown -v -f $SCRATCH_MNT -s 1 >>$seqres.full
+
+ umount $SCRATCH_DEV >/dev/null 2>&1
+
+ if _check_scratch_fs; then
+ echo "filesystem is checked ok"
+ else
+ echo "filesystem is NOT ok"
+ fi
+done
+
+status=0
+exit
diff --git a/tests/f2fs/087.out b/tests/f2fs/087.out
new file mode 100644
index 0000000..14bb897
--- /dev/null
+++ b/tests/f2fs/087.out
@@ -0,0 +1,21 @@
+QA output created by 087
+5000
+filesystem is checked ok
+10000
+filesystem is checked ok
+15000
+filesystem is checked ok
+20000
+filesystem is checked ok
+25000
+filesystem is checked ok
+30000
+filesystem is checked ok
+35000
+filesystem is checked ok
+40000
+filesystem is checked ok
+45000
+filesystem is checked ok
+50000
+filesystem is checked ok
diff --git a/tests/f2fs/group b/tests/f2fs/group
new file mode 100644
index 0000000..dd069d3
--- /dev/null
+++ b/tests/f2fs/group
@@ -0,0 +1 @@
+087 auto stress
--
2.1.1
------------------------------------------------------------------------------
Dive into the World of Parallel Programming! The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net
next prev parent reply other threads:[~2015-01-08 18:32 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-08 18:31 [PATCH 1/2] src/godown: support f2fs triggering specific ioctl Jaegeuk Kim
2015-01-08 18:31 ` Jaegeuk Kim [this message]
2015-01-08 18:44 ` Eric Sandeen
2015-01-08 20:09 ` Jaegeuk Kim
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=1420741879-73691-2-git-send-email-jaegeuk@kernel.org \
--to=jaegeuk@kernel.org \
--cc=david@fromorbit.com \
--cc=fstests@vger.kernel.org \
--cc=linux-f2fs-devel@lists.sourceforge.net \
/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).