From: Jaegeuk Kim <jaegeuk@kernel.org>
To: Dave Chinner <david@fromorbit.com>
Cc: fstests@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net,
Jaegeuk Kim <jaegeuk@kernel.org>
Subject: [PATCH 7/9 v5] common/log: add _get_log_configs for testing options
Date: Thu, 5 Feb 2015 22:37:11 -0800 [thread overview]
Message-ID: <1423204633-66673-8-git-send-email-jaegeuk@kernel.org> (raw)
In-Reply-To: <1423204633-66673-1-git-send-email-jaegeuk@kernel.org>
This patch adds _get_log_configs for xfs and f2fs to test several mount options
for:
xfs/086
* xfs/087
In xfs/087, one more test was added, so 10 tests will be done in total.
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
---
common/log | 47 +++++++++++++++++++++++++++++++++++++++++++++++
tests/xfs/086 | 15 +--------------
tests/xfs/087 | 14 +-------------
tests/xfs/087.out | 42 ++++++++++++++++++++++++++++++++++++++++++
4 files changed, 91 insertions(+), 27 deletions(-)
diff --git a/common/log b/common/log
index d8b18f8..5be5411 100644
--- a/common/log
+++ b/common/log
@@ -510,5 +510,52 @@ _require_logstate()
esac
}
+_xfs_log_config()
+{
+ echo "# mkfs-opt mount-opt"
+ echo "# ------------------------------"
+ echo " version=2 logbsize=32k"
+ echo " version=2,su=4096 logbsize=32k"
+ echo " version=2,su=32768 logbsize=32k"
+ echo " version=2,su=32768 logbsize=64k"
+ echo " version=2 logbsize=64k"
+ echo " version=2,su=64k logbsize=64k"
+ echo " version=2 logbsize=128k"
+ echo " version=2,su=128k logbsize=128k"
+ echo " version=2 logbsize=256k"
+ echo " version=2,su=256k logbsize=256k"
+}
+
+_f2fs_log_config()
+{
+ echo "# mkfs-opt mount-opt"
+ echo "# ------------------------------"
+ echo " test1 active_logs=6,background_gc=off"
+ echo " test2 active_logs=6,background_gc=off,inline_data"
+ echo " test3 active_logs=6,background_gc=off,inline_dentry"
+ echo " test4 active_logs=6,background_gc=off,inline_data,inline_dentry"
+ echo " test5 active_logs=6,background_gc=off,disable_roll_forward"
+ echo " test6 active_logs=6,background_gc=off,discard,inline_data,inline_dentry"
+ echo " test7 active_logs=6,background_gc=on"
+ echo " test8 active_logs=6,background_gc=on,inline_data"
+ echo " test9 active_logs=6,background_gc=on,inline_data,inline_dentry"
+ echo " test10 active_logs=6,background_gc=on,discard,inline_data,inline_dentry"
+}
+
+_get_log_configs()
+{
+ case "$FSTYP" in
+ xfs)
+ _xfs_log_config
+ ;;
+ f2fs)
+ _f2fs_log_config
+ ;;
+ *)
+ _notrun "$FSTYP does not support log configs."
+ ;;
+ esac
+}
+
# make sure this script returns success
/bin/true
diff --git a/tests/xfs/086 b/tests/xfs/086
index 1f81c1b..0cc5008 100755
--- a/tests/xfs/086
+++ b/tests/xfs/086
@@ -51,20 +51,7 @@ _require_v2log
echo "*** init FS"
umount $SCRATCH_DEV >/dev/null 2>&1
-cat >$tmp.seq.params <<EOF
-# mkfs-opt mount-opt
-# ------------------------------
- version=2 logbsize=32k
- version=2,su=4096 logbsize=32k
- version=2,su=32768 logbsize=32k
- version=2,su=32768 logbsize=64k
- version=2 logbsize=64k
- version=2,su=64k logbsize=64k
- version=2 logbsize=128k
- version=2,su=128k logbsize=128k
- version=2 logbsize=256k
- version=2,su=256k logbsize=256k
-EOF
+_get_log_configs > $tmp.seq.params
# Do the work for various log params which
# should not effect the data content of the log
diff --git a/tests/xfs/087 b/tests/xfs/087
index 8986f67..8da0f9c 100755
--- a/tests/xfs/087
+++ b/tests/xfs/087
@@ -67,19 +67,7 @@ _require_xfs_quota
echo "*** init FS"
umount $SCRATCH_DEV >/dev/null 2>&1
-cat >$tmp.seq.params <<EOF
-# mkfs-opt mount-opt
-# ------------------------------
- version=2 logbsize=32k
- version=2,su=4096 logbsize=32k
- version=2,su=32768 logbsize=32k
- version=2 logbsize=64k
- version=2,su=64k logbsize=64k
- version=2 logbsize=128k
- version=2,su=128k logbsize=128k
- version=2 logbsize=256k
- version=2,su=256k logbsize=256k
-EOF
+_get_log_configs > $tmp.seq.params
cat $tmp.seq.params \
| while read mkfs mnt restofline
diff --git a/tests/xfs/087.out b/tests/xfs/087.out
index 181774e..9f6f80a 100644
--- a/tests/xfs/087.out
+++ b/tests/xfs/087.out
@@ -378,3 +378,45 @@ clean log
*** filesystem is checked ok ***
+
+*** mkfs ***
+
+
+*** mount ***
+
+
+*** calling fsstress -p 4 -z -f rmdir=10 -f link=10 -f creat=10 -f mkdir=10 -f rename=30 -f stat=30 -f unlink=30 -f truncate=20 -m8 -n 10000 ***
+
+
+*** ls -RF SCRATCH_MNT ***
+
+
+*** godown ***
+
+
+*** unmount ***
+
+
+*** logprint after going down... ***
+
+dirty log
+
+*** mount with replay ***
+
+
+*** ls -RF SCRATCH_MNT ***
+
+
+*** diff ls before and after ***
+
+Files TMP.ls1 and TMP.ls2 are identical
+
+*** unmount ***
+
+
+*** logprint after mount and replay... ***
+
+clean log
+
+*** filesystem is checked ok ***
+
--
2.1.1
next prev parent reply other threads:[~2015-02-06 6:37 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-06 6:37 [PATCH 0/9 v5] make xfs/tests generic by introducing shutdown for filesystems Jaegeuk Kim
2015-02-06 6:37 ` [PATCH 1/9 v5] common/rc: add _require_scratch_shtudown Jaegeuk Kim
2015-02-06 6:37 ` [PATCH 2/9 v5] common/rc: add _require_fiemap and _extent_hole_counts Jaegeuk Kim
2015-02-10 5:47 ` Dave Chinner
2015-02-10 21:52 ` [PATCH 2/9 v6] common/rc: add _require_fiemap and counting extents and holes Jaegeuk Kim
2015-02-06 6:37 ` [PATCH 3/9 v5] common/rc: add _require_norecovery Jaegeuk Kim
2015-02-06 6:37 ` [PATCH 4/9 v5] tests/generic: relocate xfs's tests into tests/generic/ Jaegeuk Kim
2015-02-06 6:37 ` [PATCH 5/9 v5] common/log: define _require_logstate Jaegeuk Kim
2015-02-06 6:37 ` [PATCH 6/9 v5] xfs/086,087: remove specific testing options in output Jaegeuk Kim
2015-02-06 6:37 ` Jaegeuk Kim [this message]
2015-02-06 6:37 ` [PATCH 8/9 v5] common/quota: give quota mount option per filesystem Jaegeuk Kim
2015-02-10 6:01 ` Dave Chinner
2015-02-10 21:54 ` [PATCH 8/9 v6] xfs/087: " Jaegeuk Kim
2015-02-06 6:37 ` [PATCH 9/9 v5] tests/generic: relocate xfs's tests into tests/generic/ Jaegeuk Kim
2015-02-10 6:04 ` [PATCH 0/9 v5] make xfs/tests generic by introducing shutdown for filesystems Dave Chinner
2015-02-10 21:55 ` 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=1423204633-66673-8-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).