* [PATCH 0/9 v5] make xfs/tests generic by introducing shutdown for filesystems
@ 2015-02-06 6:37 Jaegeuk Kim
2015-02-06 6:37 ` [PATCH 1/9 v5] common/rc: add _require_scratch_shtudown Jaegeuk Kim
` (9 more replies)
0 siblings, 10 replies; 16+ messages in thread
From: Jaegeuk Kim @ 2015-02-06 6:37 UTC (permalink / raw)
To: Dave Chinner; +Cc: fstests, linux-f2fs-devel, Jaegeuk Kim
Thanks to Dave. :)
Change log from v4:
o add mkfs in _require_scratch_shutdown
o add _require_fiemap and _extent_hole_counts
o add _require_logstate
o modify xfs/086,087 output rules for the generic usage
o add _get_log_configs to introduce consistent testing options
o add _get_quota_option to define quota option for each filesystems
This patch-set modifies several existing xfs's tests to be used by generic
filesystems.
1. FS requirement
In order to activate these testcases, filesystem should support a new feature,
shutdown, triggered by the following ioctl command.
#define FS_IOC_SHUTDOWN _IOR('X', 125, __u32) /* Shutdown */
This ioctl needs one of three modes passed by a flag according to the syncing
policy.
#define FS_GOING_DOWN_FULLSYNC 0x0 /* going down with full sync */
#define FS_GOING_DOWN_METASYNC 0x1 /* going down with metadata */
#define FS_GOING_DOWN_NOSYNC 0x2 /* going down */
Whenever shutdown is requested with one of the above mode, filesystem must
stop any IOs, and wait for unmount, which is very useful to test power-off-
recovery.
2. Changes in xfstests
In this patch set, common/rc adds macros:
o _require_scratch_shutdown : check whether FS supports shutdown
o _require_fiemap : check bmap tool is defined
o _require_norecovery : check filesystem supports norecovery option.
o _require_logstate : check logstate tools is defined
o _get_log_configs : define mount options for tests
o _get_quota_option : define quota options for filesystems
The following tests become generic.
xfs/053 -> generic/042
xfs/137 -> generic/043
xfs/138 -> generic/044
xfs/139 -> generic/045
xfs/140 -> generic/046
xfs/179 -> generic/047
xfs/180 -> generic/048
xfs/182 -> generic/049
xfs/200 -> generic/050
xfs/306 -> generic/051
xfs/085 -> generic/052
xfs/086 -> generic/054
xfs/087 -> generic/055
Jaegeuk Kim (9):
common/rc: add _require_scratch_shtudown
common/rc: add _require_fiemap and _extent_hole_counts
common/rc: add _require_norecovery
tests/generic: relocate xfs's tests into tests/generic/
common/log: define _require_logstate
xfs/086,087: remove specific testing options in output
common/log: add _get_log_configs for testing options
common/quota: give quota mount option per filesystem
tests/generic: relocate xfs's tests into tests/generic/
common/config | 1 +
common/log | 98 +++++++++++++++++++++++++++++++---
common/quota | 15 ++++++
common/rc | 33 ++++++++++++
tests/{xfs/053 => generic/042} | 5 +-
tests/{xfs/053.out => generic/042.out} | 2 +-
tests/{xfs/137 => generic/043} | 19 ++++---
tests/generic/043.out | 1 +
tests/{xfs/138 => generic/044} | 19 ++++---
tests/generic/044.out | 1 +
tests/{xfs/139 => generic/045} | 19 ++++---
tests/generic/045.out | 1 +
tests/{xfs/140 => generic/046} | 15 +++---
tests/generic/046.out | 1 +
tests/{xfs/179 => generic/047} | 13 +++--
tests/generic/047.out | 1 +
tests/{xfs/180 => generic/048} | 13 +++--
tests/generic/048.out | 1 +
tests/{xfs/182 => generic/049} | 13 +++--
tests/generic/049.out | 1 +
tests/{xfs/200 => generic/050} | 10 ++--
tests/{xfs/200.out => generic/050.out} | 2 +-
tests/{xfs/306 => generic/051} | 5 +-
tests/{xfs/306.out => generic/051.out} | 2 +-
tests/{xfs/085 => generic/052} | 8 +--
tests/{xfs/085.out => generic/052.out} | 2 +-
tests/{xfs/086 => generic/054} | 36 +++++--------
tests/{xfs/086.out => generic/054.out} | 22 +-------
tests/{xfs/087 => generic/055} | 40 ++++++--------
tests/{xfs/087.out => generic/055.out} | 53 ++++++++++++++----
tests/generic/group | 13 +++++
tests/xfs/137.out | 1 -
tests/xfs/138.out | 1 -
tests/xfs/139.out | 1 -
tests/xfs/140.out | 1 -
tests/xfs/179.out | 1 -
tests/xfs/180.out | 1 -
tests/xfs/182.out | 1 -
tests/xfs/group | 13 -----
39 files changed, 319 insertions(+), 166 deletions(-)
rename tests/{xfs/053 => generic/042} (97%)
rename tests/{xfs/053.out => generic/042.out} (92%)
rename tests/{xfs/137 => generic/043} (87%)
create mode 100644 tests/generic/043.out
rename tests/{xfs/138 => generic/044} (87%)
create mode 100644 tests/generic/044.out
rename tests/{xfs/139 => generic/045} (87%)
create mode 100644 tests/generic/045.out
rename tests/{xfs/140 => generic/046} (90%)
create mode 100644 tests/generic/046.out
rename tests/{xfs/179 => generic/047} (90%)
create mode 100644 tests/generic/047.out
rename tests/{xfs/180 => generic/048} (91%)
create mode 100644 tests/generic/048.out
rename tests/{xfs/182 => generic/049} (90%)
create mode 100644 tests/generic/049.out
rename tests/{xfs/200 => generic/050} (95%)
rename tests/{xfs/200.out => generic/050.out} (97%)
rename tests/{xfs/306 => generic/051} (97%)
rename tests/{xfs/306.out => generic/051.out} (60%)
rename tests/{xfs/085 => generic/052} (94%)
rename tests/{xfs/085.out => generic/052.out} (94%)
rename tests/{xfs/086 => generic/054} (81%)
rename tests/{xfs/086.out => generic/054.out} (93%)
rename tests/{xfs/087 => generic/055} (79%)
rename tests/{xfs/087.out => generic/055.out} (89%)
delete mode 100644 tests/xfs/137.out
delete mode 100644 tests/xfs/138.out
delete mode 100644 tests/xfs/139.out
delete mode 100644 tests/xfs/140.out
delete mode 100644 tests/xfs/179.out
delete mode 100644 tests/xfs/180.out
delete mode 100644 tests/xfs/182.out
--
2.1.1
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH 1/9 v5] common/rc: add _require_scratch_shtudown
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 ` Jaegeuk Kim
2015-02-06 6:37 ` [PATCH 2/9 v5] common/rc: add _require_fiemap and _extent_hole_counts Jaegeuk Kim
` (8 subsequent siblings)
9 siblings, 0 replies; 16+ messages in thread
From: Jaegeuk Kim @ 2015-02-06 6:37 UTC (permalink / raw)
To: Dave Chinner; +Cc: fstests, linux-f2fs-devel, Jaegeuk Kim
This is to detect whether filesystem supports shutdown feature or not.
And let use this into the following xfs tests.
xfs/053 (data exposure)
xfs/137 (data vs filesize)
xfs/138 (data vs filesize vs truncate)
xfs/139 (data vs filesize vs partial truncate)
xfs/140 (data vs filesize vs extending truncate)
xfs/179 (data vs filesize w/ fsync)
xfs/180 (data vs filesize w/ sync)
xfs/182 (data vs filesize w/ recovery)
xfs/200 (recovery vs ro-block device)
xfs/306 (fsstress vs recovery)
xfs/085
xfs/086
xfs/087
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
---
common/rc | 12 ++++++++++++
tests/xfs/053 | 1 +
tests/xfs/085 | 1 +
tests/xfs/086 | 1 +
tests/xfs/087 | 1 +
tests/xfs/137 | 1 +
tests/xfs/138 | 1 +
tests/xfs/139 | 1 +
tests/xfs/140 | 1 +
tests/xfs/179 | 1 +
tests/xfs/180 | 1 +
tests/xfs/182 | 1 +
tests/xfs/200 | 1 +
tests/xfs/306 | 1 +
14 files changed, 25 insertions(+)
diff --git a/common/rc b/common/rc
index 5377ba0..234638b 100644
--- a/common/rc
+++ b/common/rc
@@ -2320,6 +2320,18 @@ _require_freeze()
[ $result -eq 0 ] || _notrun "$FSTYP does not support freezing"
}
+# Does shutdown work on this fs?
+_require_scratch_shutdown()
+{
+ [ -x src/godown ] || _notrun "src/godown executable not found"
+
+ _scratch_mkfs > /dev/null 2>&1
+ _scratch_mount
+ src/godown -f $SCRATCH_MNT 2>&1 \
+ || _notrun "$FSTYP does not support shutdown"
+ _scratch_unmount
+}
+
# arg 1 is dev to remove and is output of the below eg.
# ls -l /sys/class/block/sdd | rev | cut -d "/" -f 3 | rev
_devmgt_remove()
diff --git a/tests/xfs/053 b/tests/xfs/053
index 9749345..6428d5c 100755
--- a/tests/xfs/053
+++ b/tests/xfs/053
@@ -86,6 +86,7 @@ _crashtest()
_supported_fs xfs
_supported_os Linux
_require_scratch
+_require_scratch_shutdown
_require_xfs_io_command "falloc"
_require_xfs_io_command "fpunch"
_require_xfs_io_command "fzero"
diff --git a/tests/xfs/085 b/tests/xfs/085
index 54c2d01..539f324 100755
--- a/tests/xfs/085
+++ b/tests/xfs/085
@@ -47,6 +47,7 @@ rm -f $seqres.full
rm -f $tmp.log
_require_scratch
+_require_scratch_shutdown
echo "mkfs"
_scratch_mkfs_xfs >>$seqres.full 2>&1 \
diff --git a/tests/xfs/086 b/tests/xfs/086
index af09c7f..08566d7 100755
--- a/tests/xfs/086
+++ b/tests/xfs/086
@@ -44,6 +44,7 @@ _supported_os IRIX Linux
rm -f $seqres.full $tmp.*
_require_scratch
+_require_scratch_shutdown
_require_v2log
echo "*** init FS"
diff --git a/tests/xfs/087 b/tests/xfs/087
index 3a3fb49..42c7d3b 100755
--- a/tests/xfs/087
+++ b/tests/xfs/087
@@ -59,6 +59,7 @@ _supported_os IRIX Linux
rm -f $seqres.full $tmp.*
_require_scratch
+_require_scratch_shutdown
_require_v2log
_require_xfs_quota
diff --git a/tests/xfs/137 b/tests/xfs/137
index 79b3b89..662a267 100755
--- a/tests/xfs/137
+++ b/tests/xfs/137
@@ -40,6 +40,7 @@ _supported_fs xfs
_supported_os Linux IRIX
_require_scratch
+_require_scratch_shutdown
_scratch_mkfs_xfs >/dev/null 2>&1
_scratch_mount
diff --git a/tests/xfs/138 b/tests/xfs/138
index 1b11cf6..3fb182c 100755
--- a/tests/xfs/138
+++ b/tests/xfs/138
@@ -40,6 +40,7 @@ _supported_fs xfs
_supported_os Linux IRIX
_require_scratch
+_require_scratch_shutdown
_scratch_mkfs_xfs >/dev/null 2>&1
_scratch_mount
diff --git a/tests/xfs/139 b/tests/xfs/139
index e5296f7..6986c17 100755
--- a/tests/xfs/139
+++ b/tests/xfs/139
@@ -40,6 +40,7 @@ _supported_fs xfs
_supported_os Linux IRIX
_require_scratch
+_require_scratch_shutdown
_scratch_mkfs_xfs >/dev/null 2>&1
_scratch_mount
diff --git a/tests/xfs/140 b/tests/xfs/140
index cccf262..b82e43b 100755
--- a/tests/xfs/140
+++ b/tests/xfs/140
@@ -40,6 +40,7 @@ _supported_fs xfs
_supported_os Linux IRIX
_require_scratch
+_require_scratch_shutdown
_scratch_mkfs_xfs >/dev/null 2>&1
_scratch_mount
diff --git a/tests/xfs/179 b/tests/xfs/179
index ce50d99..87fac8a 100755
--- a/tests/xfs/179
+++ b/tests/xfs/179
@@ -41,6 +41,7 @@ _supported_fs xfs
_supported_os Linux IRIX
_require_scratch
+_require_scratch_shutdown
_scratch_mkfs_xfs >/dev/null 2>&1
_scratch_mount
diff --git a/tests/xfs/180 b/tests/xfs/180
index a0fb69a..b3b0fe4 100755
--- a/tests/xfs/180
+++ b/tests/xfs/180
@@ -41,6 +41,7 @@ _supported_fs xfs
_supported_os Linux IRIX
_require_scratch
+_require_scratch_shutdown
_scratch_mkfs_xfs >/dev/null 2>&1
_scratch_mount
diff --git a/tests/xfs/182 b/tests/xfs/182
index b75e4fc..dac15d4 100755
--- a/tests/xfs/182
+++ b/tests/xfs/182
@@ -41,6 +41,7 @@ _supported_fs xfs
_supported_os Linux IRIX
_require_scratch
+_require_scratch_shutdown
_scratch_mkfs_xfs >/dev/null 2>&1
_scratch_mount
diff --git a/tests/xfs/200 b/tests/xfs/200
index f0c4337..c62d2b8 100755
--- a/tests/xfs/200
+++ b/tests/xfs/200
@@ -45,6 +45,7 @@ _supported_fs xfs
_supported_os Linux
_require_scratch_nocheck
+_require_scratch_shutdown
_scratch_mkfs_xfs >/dev/null 2>&1
diff --git a/tests/xfs/306 b/tests/xfs/306
index 3053fd9..5af5ace 100755
--- a/tests/xfs/306
+++ b/tests/xfs/306
@@ -49,6 +49,7 @@ _supported_fs xfs
_supported_os Linux
_require_scratch
+_require_scratch_shutdown
rm -f $seqres.full
--
2.1.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 2/9 v5] common/rc: add _require_fiemap and _extent_hole_counts
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 ` Jaegeuk Kim
2015-02-10 5:47 ` Dave Chinner
2015-02-06 6:37 ` [PATCH 3/9 v5] common/rc: add _require_norecovery Jaegeuk Kim
` (7 subsequent siblings)
9 siblings, 1 reply; 16+ messages in thread
From: Jaegeuk Kim @ 2015-02-06 6:37 UTC (permalink / raw)
To: Dave Chinner; +Cc: fstests, linux-f2fs-devel, Jaegeuk Kim
This is to detect whether fiemap tool supports or not.
For the follwoing tests, this patch adds general script to get extent and
hole counts.
xfs/137 (data vs filesize)
xfs/138 (data vs filesize vs truncate)
xfs/139 (data vs filesize vs partial truncate)
xfs/140 (data vs filesize vs extending truncate)
xfs/179 (data vs filesize w/ fsync)
xfs/180 (data vs filesize w/ sync)
xfs/182 (data vs filesize w/ recovery)
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
---
common/rc | 13 +++++++++++++
tests/xfs/137 | 10 ++++++----
tests/xfs/138 | 10 ++++++----
tests/xfs/139 | 10 ++++++----
tests/xfs/140 | 6 ++++--
tests/xfs/179 | 6 ++++--
tests/xfs/180 | 6 ++++--
tests/xfs/182 | 6 ++++--
8 files changed, 47 insertions(+), 20 deletions(-)
diff --git a/common/rc b/common/rc
index 234638b..078d3ca 100644
--- a/common/rc
+++ b/common/rc
@@ -2332,6 +2332,19 @@ _require_scratch_shutdown()
_scratch_unmount
}
+# Does fiemap support?
+_require_fiemap()
+{
+ _require_xfs_io_command "fiemap"
+}
+
+_extent_hole_counts()
+{
+ res=`$XFS_IO_PROG -c "fiemap" $1 | tail -n +2`
+ echo $res | grep -v hole | wc -l | $AWK_PROG '{print $1}'
+ echo $res | grep hole | wc -l | $AWK_PROG '{print $1}'
+}
+
# arg 1 is dev to remove and is output of the below eg.
# ls -l /sys/class/block/sdd | rev | cut -d "/" -f 3 | rev
_devmgt_remove()
diff --git a/tests/xfs/137 b/tests/xfs/137
index 662a267..e31a616 100755
--- a/tests/xfs/137
+++ b/tests/xfs/137
@@ -41,6 +41,7 @@ _supported_os Linux IRIX
_require_scratch
_require_scratch_shutdown
+_require_fiemap
_scratch_mkfs_xfs >/dev/null 2>&1
_scratch_mount
@@ -85,11 +86,12 @@ do
if [ -s $file ]
then
# if file has non-zero size but no extents then it's contents will be NULLs, bad.
- if xfs_bmap $file | grep 'no extents' > /dev/null
- then
+ counts=`_extent_hole_counts`
+ num_extents=`echo $counts | $AWK_PROG '{print $1}'`
+ num_holes=`echo $counts | $AWK_PROG '{print $2}'`
+ if [ $num_extents -eq 0 ]; then
echo corrupt file $file - non-zero size but no extents
- elif xfs_bmap $file | grep 'hole' > /dev/null
- then
+ elif [ $num_holes -ne 0 ]; then
echo corrupt file $file - contains holes
else
rm -f $file
diff --git a/tests/xfs/138 b/tests/xfs/138
index 3fb182c..b2cbb4e 100755
--- a/tests/xfs/138
+++ b/tests/xfs/138
@@ -41,6 +41,7 @@ _supported_os Linux IRIX
_require_scratch
_require_scratch_shutdown
+_require_fiemap
_scratch_mkfs_xfs >/dev/null 2>&1
_scratch_mount
@@ -91,11 +92,12 @@ do
if [ -s $file ]
then
# if file has non-zero size but no extents then it's contents will be NULLs, bad.
- if xfs_bmap $file | grep 'no extents' > /dev/null
- then
+ counts=`_extent_hole_counts`
+ num_extents=`echo $counts | $AWK_PROG '{print $1}'`
+ num_holes=`echo $counts | $AWK_PROG '{print $2}'`
+ if [ $num_extents -eq 0 ]; then
echo corrupt file $file - non-zero size but no extents
- elif xfs_bmap $file | grep 'hole' > /dev/null
- then
+ elif [ $num_holes -ne 0 ]; then
echo corrupt file $file - contains holes
else
rm -f $file
diff --git a/tests/xfs/139 b/tests/xfs/139
index 6986c17..5e8b7c5 100755
--- a/tests/xfs/139
+++ b/tests/xfs/139
@@ -41,6 +41,7 @@ _supported_os Linux IRIX
_require_scratch
_require_scratch_shutdown
+_require_fiemap
_scratch_mkfs_xfs >/dev/null 2>&1
_scratch_mount
@@ -91,11 +92,12 @@ do
if [ -s $file ]
then
# if file has non-zero size but no extents then it's contents will be NULLs, bad.
- if xfs_bmap $file | grep 'no extents' > /dev/null
- then
+ counts=`_extent_hole_counts`
+ num_extents=`echo $counts | $AWK_PROG '{print $1}'`
+ num_holes=`echo $counts | $AWK_PROG '{print $2}'`
+ if [ $num_extents -eq 0 ]; then
echo corrupt file $file - non-zero size but no extents
- elif xfs_bmap $file | grep 'hole' > /dev/null
- then
+ elif [ $num_holes -ne 0 ]; then
echo corrupt file $file - contains holes
else
rm -f $file
diff --git a/tests/xfs/140 b/tests/xfs/140
index b82e43b..105ef0d 100755
--- a/tests/xfs/140
+++ b/tests/xfs/140
@@ -41,6 +41,7 @@ _supported_os Linux IRIX
_require_scratch
_require_scratch_shutdown
+_require_fiemap
_scratch_mkfs_xfs >/dev/null 2>&1
_scratch_mount
@@ -91,8 +92,9 @@ do
if [ -s $file ]
then
# if file has non-zero size but no extents then it's contents will be NULLs, bad.
- if xfs_bmap $file | grep 'no extents' > /dev/null
- then
+ counts=`_extent_hole_counts`
+ num_extents=`echo $counts | $AWK_PROG '{print $1}'`
+ if [ $num_extents -eq 0 ]; then
echo corrupt file $file - non-zero size but no extents
else
rm -f $file
diff --git a/tests/xfs/179 b/tests/xfs/179
index 87fac8a..5dec31f 100755
--- a/tests/xfs/179
+++ b/tests/xfs/179
@@ -42,6 +42,7 @@ _supported_os Linux IRIX
_require_scratch
_require_scratch_shutdown
+_require_fiemap
_scratch_mkfs_xfs >/dev/null 2>&1
_scratch_mount
@@ -59,8 +60,9 @@ _check_files()
if [ `ls -l $file | tr -s ' ' | cut -d ' ' -f 5` -eq 32768 ]
then
# if file has non-zero size but no extents then it's contents will be NULLs, bad.
- if xfs_bmap $file | grep 'no extents' > /dev/null
- then
+ counts=`_extent_hole_counts`
+ num_extents=`echo $counts | $AWK_PROG '{print $1}'`
+ if [ $num_extents -eq 0 ]; then
echo corrupt file $file - non-zero size but no extents
else
rm -f $file
diff --git a/tests/xfs/180 b/tests/xfs/180
index b3b0fe4..853f6f2 100755
--- a/tests/xfs/180
+++ b/tests/xfs/180
@@ -42,6 +42,7 @@ _supported_os Linux IRIX
_require_scratch
_require_scratch_shutdown
+_require_fiemap
_scratch_mkfs_xfs >/dev/null 2>&1
_scratch_mount
@@ -62,8 +63,9 @@ _check_files()
if [ `ls -l $file | tr -s ' ' | cut -d ' ' -f 5` -eq 10485760 ]
then
# if file has non-zero size but no extents then it's contents will be NULLs, bad.
- if xfs_bmap $file | grep 'no extents' > /dev/null
- then
+ counts=`_extent_hole_counts`
+ num_extents=`echo $counts | $AWK_PROG '{print $1}'`
+ if [ $num_extents -eq 0 ]; then
echo corrupt file $file - non-zero size but no extents
else
rm -f $file
diff --git a/tests/xfs/182 b/tests/xfs/182
index dac15d4..4b08989 100755
--- a/tests/xfs/182
+++ b/tests/xfs/182
@@ -42,6 +42,7 @@ _supported_os Linux IRIX
_require_scratch
_require_scratch_shutdown
+_require_fiemap
_scratch_mkfs_xfs >/dev/null 2>&1
_scratch_mount
@@ -59,8 +60,9 @@ _check_files()
if [ `ls -l $file | tr -s ' ' | cut -d ' ' -f 5` -eq 32768 ]
then
# if file has non-zero size but no extents then it's contents will be NULLs, bad.
- if xfs_bmap $file | grep 'no extents' > /dev/null
- then
+ counts=`_extent_hole_counts`
+ num_extents=`echo $counts | $AWK_PROG '{print $1}'`
+ if [ $num_extents -eq 0 ]; then
echo corrupt file $file - non-zero size but no extents
else
rm -f $file
--
2.1.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 3/9 v5] common/rc: add _require_norecovery
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-06 6:37 ` Jaegeuk Kim
2015-02-06 6:37 ` [PATCH 4/9 v5] tests/generic: relocate xfs's tests into tests/generic/ Jaegeuk Kim
` (6 subsequent siblings)
9 siblings, 0 replies; 16+ messages in thread
From: Jaegeuk Kim @ 2015-02-06 6:37 UTC (permalink / raw)
To: Dave Chinner; +Cc: fstests, linux-f2fs-devel, Jaegeuk Kim
This patch adds checking code whether filesystem supports norecovery mount
option or not.
And let use this into the following xfs test.
xfs/200 (recovery vs ro-block device)
* Currently, norecovery mount option is used by xfs only. But some of log-based
filesystems (e.g., f2fs) are able to support it later.
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
---
common/rc | 8 ++++++++
tests/xfs/200 | 1 +
2 files changed, 9 insertions(+)
diff --git a/common/rc b/common/rc
index 078d3ca..395bf6c 100644
--- a/common/rc
+++ b/common/rc
@@ -2332,6 +2332,14 @@ _require_scratch_shutdown()
_scratch_unmount
}
+# Does norecovery support by this fs?
+_require_norecovery()
+{
+ _scratch_mount -o ro,norecovery || \
+ _notrun "$FSTYP does not support norecovery"
+ _scratch_unmount
+}
+
# Does fiemap support?
_require_fiemap()
{
diff --git a/tests/xfs/200 b/tests/xfs/200
index c62d2b8..bd6d0fd 100755
--- a/tests/xfs/200
+++ b/tests/xfs/200
@@ -46,6 +46,7 @@ _supported_os Linux
_require_scratch_nocheck
_require_scratch_shutdown
+_require_norecovery
_scratch_mkfs_xfs >/dev/null 2>&1
--
2.1.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 4/9 v5] tests/generic: relocate xfs's tests into tests/generic/
2015-02-06 6:37 [PATCH 0/9 v5] make xfs/tests generic by introducing shutdown for filesystems Jaegeuk Kim
` (2 preceding siblings ...)
2015-02-06 6:37 ` [PATCH 3/9 v5] common/rc: add _require_norecovery Jaegeuk Kim
@ 2015-02-06 6:37 ` Jaegeuk Kim
2015-02-06 6:37 ` [PATCH 5/9 v5] common/log: define _require_logstate Jaegeuk Kim
` (5 subsequent siblings)
9 siblings, 0 replies; 16+ messages in thread
From: Jaegeuk Kim @ 2015-02-06 6:37 UTC (permalink / raw)
To: Dave Chinner; +Cc: fstests, linux-f2fs-devel, Jaegeuk Kim
This patch moves the generic testcases defined in xfs into tests/generic/.
xfs/053 -> generic/042
xfs/137 -> generic/043
xfs/138 -> generic/044
xfs/139 -> generic/045
xfs/140 -> generic/046
xfs/179 -> generic/047
xfs/180 -> generic/048
xfs/182 -> generic/049
xfs/200 -> generic/050
xfs/306 -> generic/051
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
---
tests/{xfs/053 => generic/042} | 4 ++--
tests/{xfs/053.out => generic/042.out} | 2 +-
tests/{xfs/137 => generic/043} | 8 ++++----
tests/generic/043.out | 1 +
tests/{xfs/138 => generic/044} | 8 ++++----
tests/generic/044.out | 1 +
tests/{xfs/139 => generic/045} | 8 ++++----
tests/generic/045.out | 1 +
tests/{xfs/140 => generic/046} | 8 ++++----
tests/generic/046.out | 1 +
tests/{xfs/179 => generic/047} | 6 +++---
tests/generic/047.out | 1 +
tests/{xfs/180 => generic/048} | 6 +++---
tests/generic/048.out | 1 +
tests/{xfs/182 => generic/049} | 6 +++---
tests/generic/049.out | 1 +
tests/{xfs/200 => generic/050} | 8 ++++----
tests/{xfs/200.out => generic/050.out} | 2 +-
tests/{xfs/306 => generic/051} | 4 ++--
tests/{xfs/306.out => generic/051.out} | 2 +-
tests/generic/group | 10 ++++++++++
tests/xfs/137.out | 1 -
tests/xfs/138.out | 1 -
tests/xfs/139.out | 1 -
tests/xfs/140.out | 1 -
tests/xfs/179.out | 1 -
tests/xfs/180.out | 1 -
tests/xfs/182.out | 1 -
tests/xfs/group | 10 ----------
29 files changed, 53 insertions(+), 53 deletions(-)
diff --git a/tests/xfs/053 b/tests/generic/042
similarity index 98%
rename from tests/xfs/053
rename to tests/generic/042
index 6428d5c..6eecbdc 100755
--- a/tests/xfs/053
+++ b/tests/generic/042
@@ -1,5 +1,5 @@
#! /bin/bash
-# FS QA Test No. 053
+# FS QA Test No. 042
#
# Test stale data exposure via writeback using various file allocation
# modification commands. The presumption is that such commands result in partial
@@ -83,7 +83,7 @@ _crashtest()
}
# Modify as appropriate.
-_supported_fs xfs
+_supported_fs generic
_supported_os Linux
_require_scratch
_require_scratch_shutdown
diff --git a/tests/xfs/053.out b/tests/generic/042.out
similarity index 92%
rename from tests/xfs/053.out
rename to tests/generic/042.out
index c777fe2..c1130e1 100644
--- a/tests/xfs/053.out
+++ b/tests/generic/042.out
@@ -1,4 +1,4 @@
-QA output created by 053
+QA output created by 042
falloc -k
wrote 65536/65536 bytes at offset 0
XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
diff --git a/tests/xfs/137 b/tests/generic/043
similarity index 96%
rename from tests/xfs/137
rename to tests/generic/043
index e31a616..8222506 100755
--- a/tests/xfs/137
+++ b/tests/generic/043
@@ -1,5 +1,5 @@
#! /bin/bash
-# FSQA Test No. 137
+# FSQA Test No. 043
#
# Test for NULL files problem
#
@@ -36,13 +36,13 @@ trap "exit \$status" 0 1 2 3 15
. ./common/filter
# real QA test starts here
-_supported_fs xfs
+_supported_fs generic
_supported_os Linux IRIX
_require_scratch
_require_scratch_shutdown
_require_fiemap
-_scratch_mkfs_xfs >/dev/null 2>&1
+_scratch_mkfs >/dev/null 2>&1
_scratch_mount
# create files
@@ -104,4 +104,4 @@ do
done
status=0
-exit
+exit
diff --git a/tests/generic/043.out b/tests/generic/043.out
new file mode 100644
index 0000000..7851fbe
--- /dev/null
+++ b/tests/generic/043.out
@@ -0,0 +1 @@
+QA output created by 043
diff --git a/tests/xfs/138 b/tests/generic/044
similarity index 97%
rename from tests/xfs/138
rename to tests/generic/044
index b2cbb4e..ef56d0e 100755
--- a/tests/xfs/138
+++ b/tests/generic/044
@@ -1,5 +1,5 @@
#! /bin/bash
-# FSQA Test No. 138
+# FSQA Test No. 044
#
# Test for NULL files problem
#
@@ -36,13 +36,13 @@ trap "exit \$status" 0 1 2 3 15
. ./common/filter
# real QA test starts here
-_supported_fs xfs
+_supported_fs generic
_supported_os Linux IRIX
_require_scratch
_require_scratch_shutdown
_require_fiemap
-_scratch_mkfs_xfs >/dev/null 2>&1
+_scratch_mkfs >/dev/null 2>&1
_scratch_mount
# create files
@@ -110,4 +110,4 @@ do
done
status=0
-exit
+exit
diff --git a/tests/generic/044.out b/tests/generic/044.out
new file mode 100644
index 0000000..ef9885b
--- /dev/null
+++ b/tests/generic/044.out
@@ -0,0 +1 @@
+QA output created by 044
diff --git a/tests/xfs/139 b/tests/generic/045
similarity index 97%
rename from tests/xfs/139
rename to tests/generic/045
index 5e8b7c5..8f90370 100755
--- a/tests/xfs/139
+++ b/tests/generic/045
@@ -1,5 +1,5 @@
#! /bin/bash
-# FSQA Test No. 139
+# FSQA Test No. 045
#
# Test for NULL files problem
#
@@ -36,13 +36,13 @@ trap "exit \$status" 0 1 2 3 15
. ./common/filter
# real QA test starts here
-_supported_fs xfs
+_supported_fs generic
_supported_os Linux IRIX
_require_scratch
_require_scratch_shutdown
_require_fiemap
-_scratch_mkfs_xfs >/dev/null 2>&1
+_scratch_mkfs >/dev/null 2>&1
_scratch_mount
# create files
@@ -110,4 +110,4 @@ do
done
status=0
-exit
+exit
diff --git a/tests/generic/045.out b/tests/generic/045.out
new file mode 100644
index 0000000..5b0d489
--- /dev/null
+++ b/tests/generic/045.out
@@ -0,0 +1 @@
+QA output created by 045
diff --git a/tests/xfs/140 b/tests/generic/046
similarity index 96%
rename from tests/xfs/140
rename to tests/generic/046
index 105ef0d..893538e 100755
--- a/tests/xfs/140
+++ b/tests/generic/046
@@ -1,5 +1,5 @@
#! /bin/bash
-# FSQA Test No. 140
+# FSQA Test No. 046
#
# Test for NULL files problem
#
@@ -36,13 +36,13 @@ trap "exit \$status" 0 1 2 3 15
. ./common/filter
# real QA test starts here
-_supported_fs xfs
+_supported_fs generic
_supported_os Linux IRIX
_require_scratch
_require_scratch_shutdown
_require_fiemap
-_scratch_mkfs_xfs >/dev/null 2>&1
+_scratch_mkfs >/dev/null 2>&1
_scratch_mount
# create files
@@ -107,4 +107,4 @@ do
done
status=0
-exit
+exit
diff --git a/tests/generic/046.out b/tests/generic/046.out
new file mode 100644
index 0000000..a14e592
--- /dev/null
+++ b/tests/generic/046.out
@@ -0,0 +1 @@
+QA output created by 046
diff --git a/tests/xfs/179 b/tests/generic/047
similarity index 97%
rename from tests/xfs/179
rename to tests/generic/047
index 5dec31f..4767456 100755
--- a/tests/xfs/179
+++ b/tests/generic/047
@@ -1,5 +1,5 @@
#! /bin/bash
-# FSQA Test No. 179
+# FSQA Test No. 047
#
# Test for NULL files problem
# test inode size is on disk after fsync
@@ -37,13 +37,13 @@ trap "exit \$status" 0 1 2 3 15
. ./common/filter
# real QA test starts here
-_supported_fs xfs
+_supported_fs generic
_supported_os Linux IRIX
_require_scratch
_require_scratch_shutdown
_require_fiemap
-_scratch_mkfs_xfs >/dev/null 2>&1
+_scratch_mkfs >/dev/null 2>&1
_scratch_mount
_check_files()
diff --git a/tests/generic/047.out b/tests/generic/047.out
new file mode 100644
index 0000000..58e2353
--- /dev/null
+++ b/tests/generic/047.out
@@ -0,0 +1 @@
+QA output created by 047
diff --git a/tests/xfs/180 b/tests/generic/048
similarity index 97%
rename from tests/xfs/180
rename to tests/generic/048
index 853f6f2..4c1edc2 100755
--- a/tests/xfs/180
+++ b/tests/generic/048
@@ -1,5 +1,5 @@
#! /bin/bash
-# FSQA Test No. 180
+# FSQA Test No. 048
#
# Test for NULL files problem
# test inode size is on disk after sync
@@ -37,13 +37,13 @@ trap "exit \$status" 0 1 2 3 15
. ./common/filter
# real QA test starts here
-_supported_fs xfs
+_supported_fs generic
_supported_os Linux IRIX
_require_scratch
_require_scratch_shutdown
_require_fiemap
-_scratch_mkfs_xfs >/dev/null 2>&1
+_scratch_mkfs >/dev/null 2>&1
_scratch_mount
# Do we have enough space on disk? 10G
diff --git a/tests/generic/048.out b/tests/generic/048.out
new file mode 100644
index 0000000..7554630
--- /dev/null
+++ b/tests/generic/048.out
@@ -0,0 +1 @@
+QA output created by 048
diff --git a/tests/xfs/182 b/tests/generic/049
similarity index 97%
rename from tests/xfs/182
rename to tests/generic/049
index 4b08989..1d2ddc5 100755
--- a/tests/xfs/182
+++ b/tests/generic/049
@@ -1,5 +1,5 @@
#! /bin/bash
-# FSQA Test No. 182
+# FSQA Test No. 049
#
# Test for NULL files problem
# test inode size is on disk after sync - expose log replay bug
@@ -37,13 +37,13 @@ trap "exit \$status" 0 1 2 3 15
. ./common/filter
# real QA test starts here
-_supported_fs xfs
+_supported_fs generic
_supported_os Linux IRIX
_require_scratch
_require_scratch_shutdown
_require_fiemap
-_scratch_mkfs_xfs >/dev/null 2>&1
+_scratch_mkfs >/dev/null 2>&1
_scratch_mount
_check_files()
diff --git a/tests/generic/049.out b/tests/generic/049.out
new file mode 100644
index 0000000..cb0061b
--- /dev/null
+++ b/tests/generic/049.out
@@ -0,0 +1 @@
+QA output created by 049
diff --git a/tests/xfs/200 b/tests/generic/050
similarity index 96%
rename from tests/xfs/200
rename to tests/generic/050
index bd6d0fd..a32e049 100755
--- a/tests/xfs/200
+++ b/tests/generic/050
@@ -1,5 +1,5 @@
#! /bin/bash
-# FS QA Test No. 200
+# FS QA Test No. 050
#
# Check out various mount/remount/unmount scenarious on a read-only blockdev.
#
@@ -41,14 +41,14 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
. ./common/filter
# real QA test starts here
-_supported_fs xfs
+_supported_fs generic
_supported_os Linux
_require_scratch_nocheck
_require_scratch_shutdown
_require_norecovery
-_scratch_mkfs_xfs >/dev/null 2>&1
+_scratch_mkfs >/dev/null 2>&1
#
# Mark the device read-only
@@ -119,7 +119,7 @@ blockdev --setrw $SCRATCH_DEV
# the underlying device is not write protected.
#
echo "mounting filesystem that needs recovery with -o ro:"
-_scratch_mount -o ro 2>&1 | _filter_scratch
+_scratch_mount -o ro 2>&1 | _filter_scratch
# success, all done
echo "*** done"
diff --git a/tests/xfs/200.out b/tests/generic/050.out
similarity index 97%
rename from tests/xfs/200.out
rename to tests/generic/050.out
index 40f9163..f8dbb7a 100644
--- a/tests/xfs/200.out
+++ b/tests/generic/050.out
@@ -1,4 +1,4 @@
-QA output created by 200
+QA output created by 050
setting device read-only
mounting read-only block device:
mount: SCRATCH_DEV is write-protected, mounting read-only
diff --git a/tests/xfs/306 b/tests/generic/051
similarity index 98%
rename from tests/xfs/306
rename to tests/generic/051
index 5af5ace..614939f 100755
--- a/tests/xfs/306
+++ b/tests/generic/051
@@ -1,5 +1,5 @@
#!/bin/bash
-# FS QA Test No. xfs/306
+# FS QA Test No. 051
#
# Basic log recovery stress test - do lots of stuff, shut down in the middle of
# it and check that recovery runs to completion and everything can be
@@ -45,7 +45,7 @@ _cleanup()
trap "_cleanup; exit \$status" 0 1 2 3 15
# real QA test starts here
-_supported_fs xfs
+_supported_fs generic
_supported_os Linux
_require_scratch
diff --git a/tests/xfs/306.out b/tests/generic/051.out
similarity index 60%
rename from tests/xfs/306.out
rename to tests/generic/051.out
index 9fd18a4..daf2e6a 100644
--- a/tests/xfs/306.out
+++ b/tests/generic/051.out
@@ -1,2 +1,2 @@
-QA output created by 306
+QA output created by 051
No output is good. Failures are loud.
diff --git a/tests/generic/group b/tests/generic/group
index fb67b57..d38240e 100644
--- a/tests/generic/group
+++ b/tests/generic/group
@@ -44,6 +44,16 @@
039 metadata auto quick
040 metadata auto quick
041 metadata auto quick
+042 auto quick rw
+043 metadata log auto
+044 metadata log auto
+045 metadata log auto
+046 metadata log auto
+047 metadata rw auto
+048 metadata rw auto
+049 metadata rw auto
+050 mount auto quick
+051 auto stress log metadata repair
053 acl repair auto quick
062 attr udf auto quick
068 other auto freeze dangerous stress
diff --git a/tests/xfs/137.out b/tests/xfs/137.out
deleted file mode 100644
index 0fd8b81..0000000
--- a/tests/xfs/137.out
+++ /dev/null
@@ -1 +0,0 @@
-QA output created by 137
diff --git a/tests/xfs/138.out b/tests/xfs/138.out
deleted file mode 100644
index f3eb411..0000000
--- a/tests/xfs/138.out
+++ /dev/null
@@ -1 +0,0 @@
-QA output created by 138
diff --git a/tests/xfs/139.out b/tests/xfs/139.out
deleted file mode 100644
index be0ebc2..0000000
--- a/tests/xfs/139.out
+++ /dev/null
@@ -1 +0,0 @@
-QA output created by 139
diff --git a/tests/xfs/140.out b/tests/xfs/140.out
deleted file mode 100644
index e6506b8..0000000
--- a/tests/xfs/140.out
+++ /dev/null
@@ -1 +0,0 @@
-QA output created by 140
diff --git a/tests/xfs/179.out b/tests/xfs/179.out
deleted file mode 100644
index e5b0ba9..0000000
--- a/tests/xfs/179.out
+++ /dev/null
@@ -1 +0,0 @@
-QA output created by 179
diff --git a/tests/xfs/180.out b/tests/xfs/180.out
deleted file mode 100644
index 9035544..0000000
--- a/tests/xfs/180.out
+++ /dev/null
@@ -1 +0,0 @@
-QA output created by 180
diff --git a/tests/xfs/182.out b/tests/xfs/182.out
deleted file mode 100644
index 5e665c8..0000000
--- a/tests/xfs/182.out
+++ /dev/null
@@ -1 +0,0 @@
-QA output created by 182
diff --git a/tests/xfs/group b/tests/xfs/group
index 496630d..4099793 100644
--- a/tests/xfs/group
+++ b/tests/xfs/group
@@ -50,7 +50,6 @@
050 quota auto quick
051 auto log metadata
052 quota db auto quick
-053 auto quick rw
054 quota auto quick
055 dump ioctl remote tape
056 dump ioctl auto quick
@@ -99,10 +98,6 @@
122 other auto quick
134 quota auto quick
136 attr2
-137 metadata log auto
-138 metadata log auto
-139 metadata log auto
-140 metadata log auto
142 dmapi
143 dmapi
144 dmapi
@@ -139,10 +134,7 @@
176 dmapi
177 dmapi
178 mkfs other auto
-179 metadata rw auto
-180 metadata rw auto
181 log auto quick
-182 metadata rw auto
183 rw other auto quick
185 dmapi
186 attr auto quick
@@ -156,7 +148,6 @@
196 quota auto quick
197 dir auto quick
199 mount auto quick
-200 mount auto quick
201 metadata auto quick
202 repair auto quick
203 ioctl auto
@@ -201,4 +192,3 @@
303 auto quick quota
304 auto quick quota
305 auto quota
-306 auto stress log metadata repair
--
2.1.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 5/9 v5] common/log: define _require_logstate
2015-02-06 6:37 [PATCH 0/9 v5] make xfs/tests generic by introducing shutdown for filesystems Jaegeuk Kim
` (3 preceding siblings ...)
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 ` Jaegeuk Kim
2015-02-06 6:37 ` [PATCH 6/9 v5] xfs/086,087: remove specific testing options in output Jaegeuk Kim
` (4 subsequent siblings)
9 siblings, 0 replies; 16+ messages in thread
From: Jaegeuk Kim @ 2015-02-06 6:37 UTC (permalink / raw)
To: Dave Chinner; +Cc: fstests, linux-f2fs-devel, Jaegeuk Kim
This patch defines logstate by adding dump.f2fs for f2fs's clean and dirty logs.
This macro is added into:
xfs/085
xfs/086
xfs/087
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
---
common/config | 1 +
common/log | 51 +++++++++++++++++++++++++++++++++++++++++++++------
tests/xfs/085 | 1 +
tests/xfs/086 | 1 +
tests/xfs/087 | 1 +
5 files changed, 49 insertions(+), 6 deletions(-)
diff --git a/common/config b/common/config
index 235f4a1..e5c3579 100644
--- a/common/config
+++ b/common/config
@@ -220,6 +220,7 @@ case "$HOSTOS" in
export MKFS_UDF_PROG="`set_prog_path mkudffs`"
export MKFS_BTRFS_PROG="`set_btrfs_mkfs_prog_path_with_opts`"
export MKFS_F2FS_PROG="`set_prog_path mkfs.f2fs`"
+ export DUMP_F2FS_PROG="`set_prog_path dump.f2fs`"
export BTRFS_UTIL_PROG="`set_prog_path btrfs`"
export BTRFS_SHOW_SUPER_PROG="`set_prog_path btrfs-show-super`"
export XFS_FSR_PROG="`set_prog_path xfs_fsr`"
diff --git a/common/log b/common/log
index 87074d9..d8b18f8 100644
--- a/common/log
+++ b/common/log
@@ -216,14 +216,35 @@ _check_log()
| head | grep -q "<CLEAN>" || _fail "DIRTY LOG"
}
+_scratch_xfs_logstate()
+{
+ _scratch_xfs_logprint -t | tee -a $seqres.full | grep -q "<CLEAN>"
+ echo $?
+}
+
+_scratch_f2fs_logstate()
+{
+ $DUMP_F2FS_PROG $SCRATCH_DEV | tee -a $seqres.full | grep -q "unmount"
+ echo $?
+}
+
_print_logstate()
{
- _scratch_xfs_logprint -t | tee -a $seqres.full >$tmp.logprint
- if grep -q "<DIRTY>" $tmp.logprint; then
- echo "dirty log"
- fi
- if grep -q "<CLEAN>" $tmp.logprint; then
- echo "clean log"
+ case "$FSTYP" in
+ xfs)
+ dirty=$(_scratch_xfs_logstate)
+ ;;
+ f2fs)
+ dirty=$(_scratch_f2fs_logstate)
+ ;;
+ *)
+ ;;
+ esac
+
+ if [ $dirty -ne 0 ]; then
+ echo "dirty log"
+ else
+ echo "clean log"
fi
}
@@ -470,6 +491,24 @@ _require_v2log()
# otherwise presume it does support v2 logs...:)
}
+_require_logstate()
+{
+ case "$FSTYP" in
+ xfs)
+ if [ -z "$XFS_LOGPRINT_PROG" ]; then
+ _notrun "This test requires xfs_logprint utility."
+ fi
+ ;;
+ f2fs)
+ if [ -z "$DUMP_F2FS_PROG" ]; then
+ _notrun "This test requires dump.f2fs utility."
+ fi
+ ;;
+ *)
+ _notrun "$FSTYP does not support log state probing."
+ ;;
+ esac
+}
# make sure this script returns success
/bin/true
diff --git a/tests/xfs/085 b/tests/xfs/085
index 539f324..1b6f424 100755
--- a/tests/xfs/085
+++ b/tests/xfs/085
@@ -48,6 +48,7 @@ rm -f $tmp.log
_require_scratch
_require_scratch_shutdown
+_require_logstate
echo "mkfs"
_scratch_mkfs_xfs >>$seqres.full 2>&1 \
diff --git a/tests/xfs/086 b/tests/xfs/086
index 08566d7..02977aa 100755
--- a/tests/xfs/086
+++ b/tests/xfs/086
@@ -45,6 +45,7 @@ _supported_os IRIX Linux
rm -f $seqres.full $tmp.*
_require_scratch
_require_scratch_shutdown
+_require_logstate
_require_v2log
echo "*** init FS"
diff --git a/tests/xfs/087 b/tests/xfs/087
index 42c7d3b..17a999c 100755
--- a/tests/xfs/087
+++ b/tests/xfs/087
@@ -60,6 +60,7 @@ _supported_os IRIX Linux
rm -f $seqres.full $tmp.*
_require_scratch
_require_scratch_shutdown
+_require_logstate
_require_v2log
_require_xfs_quota
--
2.1.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 6/9 v5] xfs/086,087: remove specific testing options in output
2015-02-06 6:37 [PATCH 0/9 v5] make xfs/tests generic by introducing shutdown for filesystems Jaegeuk Kim
` (4 preceding siblings ...)
2015-02-06 6:37 ` [PATCH 5/9 v5] common/log: define _require_logstate Jaegeuk Kim
@ 2015-02-06 6:37 ` Jaegeuk Kim
2015-02-06 6:37 ` [PATCH 7/9 v5] common/log: add _get_log_configs for testing options Jaegeuk Kim
` (3 subsequent siblings)
9 siblings, 0 replies; 16+ messages in thread
From: Jaegeuk Kim @ 2015-02-06 6:37 UTC (permalink / raw)
To: Dave Chinner; +Cc: fstests, linux-f2fs-devel, Jaegeuk Kim
This patch removes the mkfs and mount options specified in output files in
xfs/086 and xfs/087.
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
---
tests/xfs/086 | 2 +-
tests/xfs/086.out | 20 --------------------
tests/xfs/087 | 2 +-
tests/xfs/087.out | 9 ---------
4 files changed, 2 insertions(+), 31 deletions(-)
diff --git a/tests/xfs/086 b/tests/xfs/086
index 02977aa..1f81c1b 100755
--- a/tests/xfs/086
+++ b/tests/xfs/086
@@ -80,7 +80,7 @@ for s in sync nosync ; do
continue
fi
- echo "--- mkfs=$mkfs, mnt=$mnt, sync=$s ---"
+ echo "--- mkfs=$mkfs, mnt=$mnt, sync=$s ---" >>$seqres.full
export MKFS_OPTIONS="-l $mkfs"
export MOUNT_OPTIONS="-o $mnt"
diff --git a/tests/xfs/086.out b/tests/xfs/086.out
index ac56cc2..40326ee 100644
--- a/tests/xfs/086.out
+++ b/tests/xfs/086.out
@@ -1,6 +1,5 @@
QA output created by 086
*** init FS
---- mkfs=version=2, mnt=logbsize=32k, sync=sync ---
*** mkfs ***
@@ -236,7 +235,6 @@ clean log
*** filesystem is checked ok ***
---- mkfs=version=2,su=4096, mnt=logbsize=32k, sync=sync ---
*** mkfs ***
@@ -472,7 +470,6 @@ clean log
*** filesystem is checked ok ***
---- mkfs=version=2,su=32768, mnt=logbsize=32k, sync=sync ---
*** mkfs ***
@@ -708,7 +705,6 @@ clean log
*** filesystem is checked ok ***
---- mkfs=version=2,su=32768, mnt=logbsize=64k, sync=sync ---
*** mkfs ***
@@ -944,7 +940,6 @@ clean log
*** filesystem is checked ok ***
---- mkfs=version=2, mnt=logbsize=64k, sync=sync ---
*** mkfs ***
@@ -1180,7 +1175,6 @@ clean log
*** filesystem is checked ok ***
---- mkfs=version=2,su=64k, mnt=logbsize=64k, sync=sync ---
*** mkfs ***
@@ -1416,7 +1410,6 @@ clean log
*** filesystem is checked ok ***
---- mkfs=version=2, mnt=logbsize=128k, sync=sync ---
*** mkfs ***
@@ -1652,7 +1645,6 @@ clean log
*** filesystem is checked ok ***
---- mkfs=version=2,su=128k, mnt=logbsize=128k, sync=sync ---
*** mkfs ***
@@ -1888,7 +1880,6 @@ clean log
*** filesystem is checked ok ***
---- mkfs=version=2, mnt=logbsize=256k, sync=sync ---
*** mkfs ***
@@ -2124,7 +2115,6 @@ clean log
*** filesystem is checked ok ***
---- mkfs=version=2,su=256k, mnt=logbsize=256k, sync=sync ---
*** mkfs ***
@@ -2360,7 +2350,6 @@ clean log
*** filesystem is checked ok ***
---- mkfs=version=2, mnt=logbsize=32k, sync=nosync ---
*** mkfs ***
@@ -2596,7 +2585,6 @@ clean log
*** filesystem is checked ok ***
---- mkfs=version=2,su=4096, mnt=logbsize=32k, sync=nosync ---
*** mkfs ***
@@ -2832,7 +2820,6 @@ clean log
*** filesystem is checked ok ***
---- mkfs=version=2,su=32768, mnt=logbsize=32k, sync=nosync ---
*** mkfs ***
@@ -3068,7 +3055,6 @@ clean log
*** filesystem is checked ok ***
---- mkfs=version=2,su=32768, mnt=logbsize=64k, sync=nosync ---
*** mkfs ***
@@ -3304,7 +3290,6 @@ clean log
*** filesystem is checked ok ***
---- mkfs=version=2, mnt=logbsize=64k, sync=nosync ---
*** mkfs ***
@@ -3540,7 +3525,6 @@ clean log
*** filesystem is checked ok ***
---- mkfs=version=2,su=64k, mnt=logbsize=64k, sync=nosync ---
*** mkfs ***
@@ -3776,7 +3760,6 @@ clean log
*** filesystem is checked ok ***
---- mkfs=version=2, mnt=logbsize=128k, sync=nosync ---
*** mkfs ***
@@ -4012,7 +3995,6 @@ clean log
*** filesystem is checked ok ***
---- mkfs=version=2,su=128k, mnt=logbsize=128k, sync=nosync ---
*** mkfs ***
@@ -4248,7 +4230,6 @@ clean log
*** filesystem is checked ok ***
---- mkfs=version=2, mnt=logbsize=256k, sync=nosync ---
*** mkfs ***
@@ -4484,7 +4465,6 @@ clean log
*** filesystem is checked ok ***
---- mkfs=version=2,su=256k, mnt=logbsize=256k, sync=nosync ---
*** mkfs ***
diff --git a/tests/xfs/087 b/tests/xfs/087
index 17a999c..8986f67 100755
--- a/tests/xfs/087
+++ b/tests/xfs/087
@@ -88,7 +88,7 @@ do
continue
fi
- echo "--- mkfs=$mkfs, mnt=$mnt ---"
+ echo "--- mkfs=$mkfs, mnt=$mnt ---" >> $seqres.full
export MKFS_OPTIONS="-l $mkfs"
export MOUNT_OPTIONS="-o $mnt"
diff --git a/tests/xfs/087.out b/tests/xfs/087.out
index 9f009c0..181774e 100644
--- a/tests/xfs/087.out
+++ b/tests/xfs/087.out
@@ -1,6 +1,5 @@
QA output created by 087
*** init FS
---- mkfs=version=2, mnt=logbsize=32k ---
*** mkfs ***
@@ -43,7 +42,6 @@ clean log
*** filesystem is checked ok ***
---- mkfs=version=2,su=4096, mnt=logbsize=32k ---
*** mkfs ***
@@ -86,7 +84,6 @@ clean log
*** filesystem is checked ok ***
---- mkfs=version=2,su=32768, mnt=logbsize=32k ---
*** mkfs ***
@@ -129,7 +126,6 @@ clean log
*** filesystem is checked ok ***
---- mkfs=version=2, mnt=logbsize=64k ---
*** mkfs ***
@@ -172,7 +168,6 @@ clean log
*** filesystem is checked ok ***
---- mkfs=version=2,su=64k, mnt=logbsize=64k ---
*** mkfs ***
@@ -215,7 +210,6 @@ clean log
*** filesystem is checked ok ***
---- mkfs=version=2, mnt=logbsize=128k ---
*** mkfs ***
@@ -258,7 +252,6 @@ clean log
*** filesystem is checked ok ***
---- mkfs=version=2,su=128k, mnt=logbsize=128k ---
*** mkfs ***
@@ -301,7 +294,6 @@ clean log
*** filesystem is checked ok ***
---- mkfs=version=2, mnt=logbsize=256k ---
*** mkfs ***
@@ -344,7 +336,6 @@ clean log
*** filesystem is checked ok ***
---- mkfs=version=2,su=256k, mnt=logbsize=256k ---
*** mkfs ***
--
2.1.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 7/9 v5] common/log: add _get_log_configs for testing options
2015-02-06 6:37 [PATCH 0/9 v5] make xfs/tests generic by introducing shutdown for filesystems Jaegeuk Kim
` (5 preceding siblings ...)
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
2015-02-06 6:37 ` [PATCH 8/9 v5] common/quota: give quota mount option per filesystem Jaegeuk Kim
` (2 subsequent siblings)
9 siblings, 0 replies; 16+ messages in thread
From: Jaegeuk Kim @ 2015-02-06 6:37 UTC (permalink / raw)
To: Dave Chinner; +Cc: fstests, linux-f2fs-devel, Jaegeuk Kim
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
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 8/9 v5] common/quota: give quota mount option per filesystem
2015-02-06 6:37 [PATCH 0/9 v5] make xfs/tests generic by introducing shutdown for filesystems Jaegeuk Kim
` (6 preceding siblings ...)
2015-02-06 6:37 ` [PATCH 7/9 v5] common/log: add _get_log_configs for testing options Jaegeuk Kim
@ 2015-02-06 6:37 ` Jaegeuk Kim
2015-02-10 6:01 ` Dave Chinner
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
9 siblings, 1 reply; 16+ messages in thread
From: Jaegeuk Kim @ 2015-02-06 6:37 UTC (permalink / raw)
To: Dave Chinner; +Cc: fstests, linux-f2fs-devel, Jaegeuk Kim
This patch add _get_quota_option to assign the mount option selectively
in:
tests/xfs/087
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
---
common/quota | 15 +++++++++++++++
tests/xfs/087 | 7 ++++---
2 files changed, 19 insertions(+), 3 deletions(-)
diff --git a/common/quota b/common/quota
index b320cf2..a103826 100644
--- a/common/quota
+++ b/common/quota
@@ -78,6 +78,21 @@ _require_xfs_quota()
}
#
+# give quota option accoring to the filesystems.
+#
+_get_quota_option()
+{
+ case $FSTYP in
+ xfs)
+ _require_xfs_quota
+ echo "-o uquota"
+ ;;
+ *)
+ ;;
+ esac
+}
+
+#
# checks that the XFS project quota support in the kernel is enabled.
#
_require_prjquota()
diff --git a/tests/xfs/087 b/tests/xfs/087
index 8da0f9c..2fd6f1a 100755
--- a/tests/xfs/087
+++ b/tests/xfs/087
@@ -62,7 +62,8 @@ _require_scratch
_require_scratch_shutdown
_require_logstate
_require_v2log
-_require_xfs_quota
+
+QUOTA_OPTION=`_get_quota_option`
echo "*** init FS"
umount $SCRATCH_DEV >/dev/null 2>&1
@@ -90,7 +91,7 @@ do
# mount the FS
_echofull "mount"
- if ! _scratch_mount -o uquota >>$seqres.full 2>&1; then
+ if ! _scratch_mount $QUOTA_OPTION >>$seqres.full 2>&1; then
_echofull "mount failed: $MOUNT_OPTIONS"
continue
fi
@@ -116,7 +117,7 @@ do
_scratch_xfs_logprint -n >>$seqres.full 2>&1
_echofull "mount with replay"
- _scratch_mount -o uquota >>$seqres.full 2>&1 \
+ _scratch_mount $QUOTA_OPTION >>$seqres.full 2>&1 \
|| _fail "mount failed: $MOUNT_OPTIONS"
# check on what FS looks like after log recovery
--
2.1.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 9/9 v5] tests/generic: relocate xfs's tests into tests/generic/
2015-02-06 6:37 [PATCH 0/9 v5] make xfs/tests generic by introducing shutdown for filesystems Jaegeuk Kim
` (7 preceding siblings ...)
2015-02-06 6:37 ` [PATCH 8/9 v5] common/quota: give quota mount option per filesystem Jaegeuk Kim
@ 2015-02-06 6:37 ` Jaegeuk Kim
2015-02-10 6:04 ` [PATCH 0/9 v5] make xfs/tests generic by introducing shutdown for filesystems Dave Chinner
9 siblings, 0 replies; 16+ messages in thread
From: Jaegeuk Kim @ 2015-02-06 6:37 UTC (permalink / raw)
To: Dave Chinner; +Cc: fstests, linux-f2fs-devel, Jaegeuk Kim
This patch moves the generic testcases defined in xfs into tests/generic/.
xfs/085 -> generic/052
xfs/086 -> generic/054
xfs/087 -> generic/055
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
---
tests/{xfs/085 => generic/052} | 6 +++---
tests/{xfs/085.out => generic/052.out} | 2 +-
tests/{xfs/086 => generic/054} | 17 ++++++++---------
tests/{xfs/086.out => generic/054.out} | 2 +-
tests/{xfs/087 => generic/055} | 15 +++++++--------
tests/{xfs/087.out => generic/055.out} | 2 +-
tests/generic/group | 3 +++
tests/xfs/group | 3 ---
8 files changed, 24 insertions(+), 26 deletions(-)
diff --git a/tests/xfs/085 b/tests/generic/052
similarity index 96%
rename from tests/xfs/085
rename to tests/generic/052
index 1b6f424..3430b65 100755
--- a/tests/xfs/085
+++ b/tests/generic/052
@@ -1,5 +1,5 @@
#! /bin/bash
-# FS QA Test No. 085
+# FS QA Test No. 052
#
# To test log replay by shutdown of file system
# This is the first simple initial test to ensure that
@@ -40,7 +40,7 @@ trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
. ./common/log
# real QA test starts here
-_supported_fs xfs
+_supported_fs generic
_supported_os IRIX Linux
rm -f $seqres.full
@@ -51,7 +51,7 @@ _require_scratch_shutdown
_require_logstate
echo "mkfs"
-_scratch_mkfs_xfs >>$seqres.full 2>&1 \
+_scratch_mkfs >>$seqres.full 2>&1 \
|| _fail "mkfs scratch failed"
echo "mount"
diff --git a/tests/xfs/085.out b/tests/generic/052.out
similarity index 94%
rename from tests/xfs/085.out
rename to tests/generic/052.out
index d2d99a1..df7a66a 100644
--- a/tests/xfs/085.out
+++ b/tests/generic/052.out
@@ -1,4 +1,4 @@
-QA output created by 085
+QA output created by 052
mkfs
mount
touch files
diff --git a/tests/xfs/086 b/tests/generic/054
similarity index 92%
rename from tests/xfs/086
rename to tests/generic/054
index 0cc5008..6cb0122 100755
--- a/tests/xfs/086
+++ b/tests/generic/054
@@ -1,5 +1,5 @@
#! /bin/bash
-# FS QA Test No. 086
+# FS QA Test No. 054
#
# To test log replay with version 2 logs
# Initially keep this simple with just creates.
@@ -39,14 +39,13 @@ trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
. ./common/log
# real QA test starts here
-_supported_fs xfs
+_supported_fs generic
_supported_os IRIX Linux
rm -f $seqres.full $tmp.*
_require_scratch
_require_scratch_shutdown
_require_logstate
-_require_v2log
echo "*** init FS"
umount $SCRATCH_DEV >/dev/null 2>&1
@@ -56,14 +55,14 @@ _get_log_configs > $tmp.seq.params
# Do the work for various log params which
# should not effect the data content of the log
# Try with and without sync'ing - sync'ing will mean that
-# the log will be written out unfilled and thus the log
+# the log will be written out unfilled and thus the log
# stripe can have an effect.
#
for s in sync nosync ; do
cat $tmp.seq.params \
| while read mkfs mnt restofline
do
- if [ "$mkfs" = "#" ]; then
+ if [ "$mkfs" = "#" ]; then
continue
fi
@@ -73,8 +72,8 @@ for s in sync nosync ; do
# mkfs the FS
_echofull "mkfs"
- _scratch_mkfs_xfs >>$seqres.full 2>&1
- if [ $? -ne 0 ] ; then
+ _scratch_mkfs >>$seqres.full 2>&1
+ if [ $? -ne 0 ] ; then
_echofull "mkfs failed: $MKFS_OPTIONS"
continue
fi
@@ -89,7 +88,7 @@ for s in sync nosync ; do
# create the metadata
if [ $s = "sync" ]; then
# generate some log traffic - but not too much
- # add some syncs to get the log flushed to disk
+ # add some syncs to get the log flushed to disk
for file in $SCRATCH_MNT/{0,1,2,3,4,5,6,7,8,9}{0,1,2,3,4,5,6,7,8,9}; do
touch $file
sync
@@ -137,5 +136,5 @@ for s in sync nosync ; do
done
done
-status=0
+status=0
exit
diff --git a/tests/xfs/086.out b/tests/generic/054.out
similarity index 99%
rename from tests/xfs/086.out
rename to tests/generic/054.out
index 40326ee..4654bde 100644
--- a/tests/xfs/086.out
+++ b/tests/generic/054.out
@@ -1,4 +1,4 @@
-QA output created by 086
+QA output created by 054
*** init FS
*** mkfs ***
diff --git a/tests/xfs/087 b/tests/generic/055
similarity index 93%
rename from tests/xfs/087
rename to tests/generic/055
index 2fd6f1a..068f0c3 100755
--- a/tests/xfs/087
+++ b/tests/generic/055
@@ -1,7 +1,7 @@
#! /bin/bash
-# FS QA Test No. 087
+# FS QA Test No. 055
#
-# * like 086 but want to create more/different kinds of metadata
+# * like 054 but want to create more/different kinds of metadata
# and so will use fsstress
# * also can interrupt metadata with godown
#
@@ -54,14 +54,13 @@ _do_meta()
}
# real QA test starts here
-_supported_fs xfs
+_supported_fs generic
_supported_os IRIX Linux
rm -f $seqres.full $tmp.*
_require_scratch
_require_scratch_shutdown
_require_logstate
-_require_v2log
QUOTA_OPTION=`_get_quota_option`
@@ -73,7 +72,7 @@ _get_log_configs > $tmp.seq.params
cat $tmp.seq.params \
| while read mkfs mnt restofline
do
- if [ "$mkfs" = "#" ]; then
+ if [ "$mkfs" = "#" ]; then
continue
fi
@@ -83,8 +82,8 @@ do
# mkfs the FS
_echofull "mkfs"
- _scratch_mkfs_xfs >>$seqres.full 2>&1
- if [ $? -ne 0 ] ; then
+ _scratch_mkfs >>$seqres.full 2>&1
+ if [ $? -ne 0 ] ; then
_echofull "mkfs failed: $MKFS_OPTIONS"
continue
fi
@@ -140,5 +139,5 @@ do
fi
done
-status=0
+status=0
exit
diff --git a/tests/xfs/087.out b/tests/generic/055.out
similarity index 99%
rename from tests/xfs/087.out
rename to tests/generic/055.out
index 9f6f80a..048ef1e 100644
--- a/tests/xfs/087.out
+++ b/tests/generic/055.out
@@ -1,4 +1,4 @@
-QA output created by 087
+QA output created by 055
*** init FS
*** mkfs ***
diff --git a/tests/generic/group b/tests/generic/group
index d38240e..441d5a1 100644
--- a/tests/generic/group
+++ b/tests/generic/group
@@ -54,7 +54,10 @@
049 metadata rw auto
050 mount auto quick
051 auto stress log metadata repair
+052 log auto quick
053 acl repair auto quick
+054 log v2log auto
+055 log v2log auto quota stress
062 attr udf auto quick
068 other auto freeze dangerous stress
069 rw udf auto quick
diff --git a/tests/xfs/group b/tests/xfs/group
index 4099793..3e1cffb 100644
--- a/tests/xfs/group
+++ b/tests/xfs/group
@@ -73,9 +73,6 @@
081 deprecated # log logprint quota
082 deprecated # log logprint v2log
084 ioctl rw auto
-085 log auto quick
-086 log v2log auto
-087 log v2log auto quota stress
090 rw auto
092 other auto quick
094 metadata dir ioctl auto
--
2.1.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: [PATCH 2/9 v5] common/rc: add _require_fiemap and _extent_hole_counts
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
0 siblings, 1 reply; 16+ messages in thread
From: Dave Chinner @ 2015-02-10 5:47 UTC (permalink / raw)
To: Jaegeuk Kim; +Cc: fstests, linux-f2fs-devel
On Thu, Feb 05, 2015 at 10:37:06PM -0800, Jaegeuk Kim wrote:
> This is to detect whether fiemap tool supports or not.
>
> For the follwoing tests, this patch adds general script to get extent and
> hole counts.
>
> xfs/137 (data vs filesize)
> xfs/138 (data vs filesize vs truncate)
> xfs/139 (data vs filesize vs partial truncate)
> xfs/140 (data vs filesize vs extending truncate)
> xfs/179 (data vs filesize w/ fsync)
> xfs/180 (data vs filesize w/ sync)
> xfs/182 (data vs filesize w/ recovery)
>
> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
> ---
> common/rc | 13 +++++++++++++
> tests/xfs/137 | 10 ++++++----
> tests/xfs/138 | 10 ++++++----
> tests/xfs/139 | 10 ++++++----
> tests/xfs/140 | 6 ++++--
> tests/xfs/179 | 6 ++++--
> tests/xfs/180 | 6 ++++--
> tests/xfs/182 | 6 ++++--
> 8 files changed, 47 insertions(+), 20 deletions(-)
>
> diff --git a/common/rc b/common/rc
> index 234638b..078d3ca 100644
> --- a/common/rc
> +++ b/common/rc
> @@ -2332,6 +2332,19 @@ _require_scratch_shutdown()
> _scratch_unmount
> }
>
> +# Does fiemap support?
> +_require_fiemap()
> +{
> + _require_xfs_io_command "fiemap"
> +}
> +
> +_extent_hole_counts()
> +{
> + res=`$XFS_IO_PROG -c "fiemap" $1 | tail -n +2`
> + echo $res | grep -v hole | wc -l | $AWK_PROG '{print $1}'
> + echo $res | grep hole | wc -l | $AWK_PROG '{print $1}'
> +}
Two functions - _count_extents() and _count_holes().
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 8/9 v5] common/quota: give quota mount option per filesystem
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
0 siblings, 1 reply; 16+ messages in thread
From: Dave Chinner @ 2015-02-10 6:01 UTC (permalink / raw)
To: Jaegeuk Kim; +Cc: fstests, linux-f2fs-devel
On Thu, Feb 05, 2015 at 10:37:12PM -0800, Jaegeuk Kim wrote:
> This patch add _get_quota_option to assign the mount option selectively
> in:
>
> tests/xfs/087
>
> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
> ---
> common/quota | 15 +++++++++++++++
> tests/xfs/087 | 7 ++++---
> 2 files changed, 19 insertions(+), 3 deletions(-)
>
> diff --git a/common/quota b/common/quota
> index b320cf2..a103826 100644
> --- a/common/quota
> +++ b/common/quota
> @@ -78,6 +78,21 @@ _require_xfs_quota()
> }
>
> #
> +# give quota option accoring to the filesystems.
> +#
> +_get_quota_option()
> +{
> + case $FSTYP in
> + xfs)
> + _require_xfs_quota
> + echo "-o uquota"
> + ;;
> + *)
> + ;;
> + esac
> +}
Looking at this, it's pretty specific to the test, so it's probably
best just to leave it as a helper function in the test itself.
Otherwise look s good.
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 0/9 v5] make xfs/tests generic by introducing shutdown for filesystems
2015-02-06 6:37 [PATCH 0/9 v5] make xfs/tests generic by introducing shutdown for filesystems Jaegeuk Kim
` (8 preceding siblings ...)
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 ` Dave Chinner
2015-02-10 21:55 ` Jaegeuk Kim
9 siblings, 1 reply; 16+ messages in thread
From: Dave Chinner @ 2015-02-10 6:04 UTC (permalink / raw)
To: Jaegeuk Kim; +Cc: fstests, linux-f2fs-devel
On Thu, Feb 05, 2015 at 10:37:04PM -0800, Jaegeuk Kim wrote:
> Thanks to Dave. :)
>
> Change log from v4:
> o add mkfs in _require_scratch_shutdown
> o add _require_fiemap and _extent_hole_counts
> o add _require_logstate
> o modify xfs/086,087 output rules for the generic usage
> o add _get_log_configs to introduce consistent testing options
> o add _get_quota_option to define quota option for each filesystems
>
> This patch-set modifies several existing xfs's tests to be used by generic
> filesystems.
This looks pretty good now. There's still a couple of minor things,
but the rest of it looks pretty good. Just resend the patches that
need updating - there's no need to resend the entire series at this
point.
BTW, many thanks for sending the rename patches in git format - they
are much easier to read and validate. :)
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 2/9 v6] common/rc: add _require_fiemap and counting extents and holes
2015-02-10 5:47 ` Dave Chinner
@ 2015-02-10 21:52 ` Jaegeuk Kim
0 siblings, 0 replies; 16+ messages in thread
From: Jaegeuk Kim @ 2015-02-10 21:52 UTC (permalink / raw)
To: Dave Chinner; +Cc: fstests, linux-f2fs-devel
Change log from v5:
o split _count_extents and _count_holes
-- >8 --
This is to detect whether fiemap tool supports or not.
For the follwoing tests, this patch adds general script to get extent and
hole counts.
xfs/137 (data vs filesize)
xfs/138 (data vs filesize vs truncate)
xfs/139 (data vs filesize vs partial truncate)
xfs/140 (data vs filesize vs extending truncate)
xfs/179 (data vs filesize w/ fsync)
xfs/180 (data vs filesize w/ sync)
xfs/182 (data vs filesize w/ recovery)
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
---
common/rc | 18 ++++++++++++++++++
tests/xfs/137 | 9 +++++----
tests/xfs/138 | 9 +++++----
tests/xfs/139 | 9 +++++----
tests/xfs/140 | 5 +++--
tests/xfs/179 | 5 +++--
tests/xfs/180 | 5 +++--
tests/xfs/182 | 5 +++--
8 files changed, 45 insertions(+), 20 deletions(-)
diff --git a/common/rc b/common/rc
index 234638b..a0b92eb 100644
--- a/common/rc
+++ b/common/rc
@@ -2332,6 +2332,24 @@ _require_scratch_shutdown()
_scratch_unmount
}
+# Does fiemap support?
+_require_fiemap()
+{
+ _require_xfs_io_command "fiemap"
+}
+
+_count_extents()
+{
+ res=`$XFS_IO_PROG -c "fiemap" $1 | tail -n +2`
+ echo $res | grep -v hole | wc -l | $AWK_PROG '{print $1}'
+}
+
+_count_holes()
+{
+ res=`$XFS_IO_PROG -c "fiemap" $1 | tail -n +2`
+ echo $res | grep hole | wc -l | $AWK_PROG '{print $1}'
+}
+
# arg 1 is dev to remove and is output of the below eg.
# ls -l /sys/class/block/sdd | rev | cut -d "/" -f 3 | rev
_devmgt_remove()
diff --git a/tests/xfs/137 b/tests/xfs/137
index 662a267..eb9a5fa 100755
--- a/tests/xfs/137
+++ b/tests/xfs/137
@@ -41,6 +41,7 @@ _supported_os Linux IRIX
_require_scratch
_require_scratch_shutdown
+_require_fiemap
_scratch_mkfs_xfs >/dev/null 2>&1
_scratch_mount
@@ -85,11 +86,11 @@ do
if [ -s $file ]
then
# if file has non-zero size but no extents then it's contents will be NULLs, bad.
- if xfs_bmap $file | grep 'no extents' > /dev/null
- then
+ num_extents=`_count_extents $file`
+ num_holes=`_count_holes $file`
+ if [ $num_extents -eq 0 ]; then
echo corrupt file $file - non-zero size but no extents
- elif xfs_bmap $file | grep 'hole' > /dev/null
- then
+ elif [ $num_holes -ne 0 ]; then
echo corrupt file $file - contains holes
else
rm -f $file
diff --git a/tests/xfs/138 b/tests/xfs/138
index 3fb182c..809a8ee 100755
--- a/tests/xfs/138
+++ b/tests/xfs/138
@@ -41,6 +41,7 @@ _supported_os Linux IRIX
_require_scratch
_require_scratch_shutdown
+_require_fiemap
_scratch_mkfs_xfs >/dev/null 2>&1
_scratch_mount
@@ -91,11 +92,11 @@ do
if [ -s $file ]
then
# if file has non-zero size but no extents then it's contents will be NULLs, bad.
- if xfs_bmap $file | grep 'no extents' > /dev/null
- then
+ num_extents=`_count_extents $file`
+ num_holes=`_count_holes $file`
+ if [ $num_extents -eq 0 ]; then
echo corrupt file $file - non-zero size but no extents
- elif xfs_bmap $file | grep 'hole' > /dev/null
- then
+ elif [ $num_holes -ne 0 ]; then
echo corrupt file $file - contains holes
else
rm -f $file
diff --git a/tests/xfs/139 b/tests/xfs/139
index 6986c17..de91a29 100755
--- a/tests/xfs/139
+++ b/tests/xfs/139
@@ -41,6 +41,7 @@ _supported_os Linux IRIX
_require_scratch
_require_scratch_shutdown
+_require_fiemap
_scratch_mkfs_xfs >/dev/null 2>&1
_scratch_mount
@@ -91,11 +92,11 @@ do
if [ -s $file ]
then
# if file has non-zero size but no extents then it's contents will be NULLs, bad.
- if xfs_bmap $file | grep 'no extents' > /dev/null
- then
+ num_extents=`_count_extents $file`
+ num_holes=`_count_holes $file`
+ if [ $num_extents -eq 0 ]; then
echo corrupt file $file - non-zero size but no extents
- elif xfs_bmap $file | grep 'hole' > /dev/null
- then
+ elif [ $num_holes -ne 0 ]; then
echo corrupt file $file - contains holes
else
rm -f $file
diff --git a/tests/xfs/140 b/tests/xfs/140
index b82e43b..4882abd 100755
--- a/tests/xfs/140
+++ b/tests/xfs/140
@@ -41,6 +41,7 @@ _supported_os Linux IRIX
_require_scratch
_require_scratch_shutdown
+_require_fiemap
_scratch_mkfs_xfs >/dev/null 2>&1
_scratch_mount
@@ -91,8 +92,8 @@ do
if [ -s $file ]
then
# if file has non-zero size but no extents then it's contents will be NULLs, bad.
- if xfs_bmap $file | grep 'no extents' > /dev/null
- then
+ num_extents=`_count_extents $file`
+ if [ $num_extents -eq 0 ]; then
echo corrupt file $file - non-zero size but no extents
else
rm -f $file
diff --git a/tests/xfs/179 b/tests/xfs/179
index 87fac8a..2f3673e 100755
--- a/tests/xfs/179
+++ b/tests/xfs/179
@@ -42,6 +42,7 @@ _supported_os Linux IRIX
_require_scratch
_require_scratch_shutdown
+_require_fiemap
_scratch_mkfs_xfs >/dev/null 2>&1
_scratch_mount
@@ -59,8 +60,8 @@ _check_files()
if [ `ls -l $file | tr -s ' ' | cut -d ' ' -f 5` -eq 32768 ]
then
# if file has non-zero size but no extents then it's contents will be NULLs, bad.
- if xfs_bmap $file | grep 'no extents' > /dev/null
- then
+ num_extents=`_count_extents $file`
+ if [ $num_extents -eq 0 ]; then
echo corrupt file $file - non-zero size but no extents
else
rm -f $file
diff --git a/tests/xfs/180 b/tests/xfs/180
index b3b0fe4..40a186a 100755
--- a/tests/xfs/180
+++ b/tests/xfs/180
@@ -42,6 +42,7 @@ _supported_os Linux IRIX
_require_scratch
_require_scratch_shutdown
+_require_fiemap
_scratch_mkfs_xfs >/dev/null 2>&1
_scratch_mount
@@ -62,8 +63,8 @@ _check_files()
if [ `ls -l $file | tr -s ' ' | cut -d ' ' -f 5` -eq 10485760 ]
then
# if file has non-zero size but no extents then it's contents will be NULLs, bad.
- if xfs_bmap $file | grep 'no extents' > /dev/null
- then
+ num_extents=`_count_extents $file`
+ if [ $num_extents -eq 0 ]; then
echo corrupt file $file - non-zero size but no extents
else
rm -f $file
diff --git a/tests/xfs/182 b/tests/xfs/182
index dac15d4..028e121 100755
--- a/tests/xfs/182
+++ b/tests/xfs/182
@@ -42,6 +42,7 @@ _supported_os Linux IRIX
_require_scratch
_require_scratch_shutdown
+_require_fiemap
_scratch_mkfs_xfs >/dev/null 2>&1
_scratch_mount
@@ -59,8 +60,8 @@ _check_files()
if [ `ls -l $file | tr -s ' ' | cut -d ' ' -f 5` -eq 32768 ]
then
# if file has non-zero size but no extents then it's contents will be NULLs, bad.
- if xfs_bmap $file | grep 'no extents' > /dev/null
- then
+ num_extents=`_count_extents $file`
+ if [ $num_extents -eq 0 ]; then
echo corrupt file $file - non-zero size but no extents
else
rm -f $file
--
2.1.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: [PATCH 8/9 v6] xfs/087: give quota mount option per filesystem
2015-02-10 6:01 ` Dave Chinner
@ 2015-02-10 21:54 ` Jaegeuk Kim
0 siblings, 0 replies; 16+ messages in thread
From: Jaegeuk Kim @ 2015-02-10 21:54 UTC (permalink / raw)
To: Dave Chinner; +Cc: fstests, linux-f2fs-devel
Change log from v5:
o move function into the test script
-- >8 --
This patch add _get_quota_option to assign the mount option selectively.
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
---
tests/xfs/087 | 19 ++++++++++++++++---
1 file changed, 16 insertions(+), 3 deletions(-)
diff --git a/tests/xfs/087 b/tests/xfs/087
index 8da0f9c..38be6d5 100755
--- a/tests/xfs/087
+++ b/tests/xfs/087
@@ -53,6 +53,18 @@ _do_meta()
fi
}
+_get_quota_option()
+{
+ case $FSTYP in
+ xfs)
+ _require_xfs_quota
+ echo "-o uquota"
+ ;;
+ *)
+ ;;
+ esac
+}
+
# real QA test starts here
_supported_fs xfs
_supported_os IRIX Linux
@@ -62,7 +74,8 @@ _require_scratch
_require_scratch_shutdown
_require_logstate
_require_v2log
-_require_xfs_quota
+
+QUOTA_OPTION=`_get_quota_option`
echo "*** init FS"
umount $SCRATCH_DEV >/dev/null 2>&1
@@ -90,7 +103,7 @@ do
# mount the FS
_echofull "mount"
- if ! _scratch_mount -o uquota >>$seqres.full 2>&1; then
+ if ! _scratch_mount $QUOTA_OPTION >>$seqres.full 2>&1; then
_echofull "mount failed: $MOUNT_OPTIONS"
continue
fi
@@ -116,7 +129,7 @@ do
_scratch_xfs_logprint -n >>$seqres.full 2>&1
_echofull "mount with replay"
- _scratch_mount -o uquota >>$seqres.full 2>&1 \
+ _scratch_mount $QUOTA_OPTION >>$seqres.full 2>&1 \
|| _fail "mount failed: $MOUNT_OPTIONS"
# check on what FS looks like after log recovery
--
2.1.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: [PATCH 0/9 v5] make xfs/tests generic by introducing shutdown for filesystems
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
0 siblings, 0 replies; 16+ messages in thread
From: Jaegeuk Kim @ 2015-02-10 21:55 UTC (permalink / raw)
To: Dave Chinner; +Cc: fstests, linux-f2fs-devel
On Tue, Feb 10, 2015 at 05:04:14PM +1100, Dave Chinner wrote:
> On Thu, Feb 05, 2015 at 10:37:04PM -0800, Jaegeuk Kim wrote:
> > Thanks to Dave. :)
> >
> > Change log from v4:
> > o add mkfs in _require_scratch_shutdown
> > o add _require_fiemap and _extent_hole_counts
> > o add _require_logstate
> > o modify xfs/086,087 output rules for the generic usage
> > o add _get_log_configs to introduce consistent testing options
> > o add _get_quota_option to define quota option for each filesystems
> >
> > This patch-set modifies several existing xfs's tests to be used by generic
> > filesystems.
>
> This looks pretty good now. There's still a couple of minor things,
> but the rest of it looks pretty good. Just resend the patches that
> need updating - there's no need to resend the entire series at this
> point.
>
> BTW, many thanks for sending the rename patches in git format - they
> are much easier to read and validate. :)
Thank you very much for the review. :)
>
> Cheers,
>
> Dave.
> --
> Dave Chinner
> david@fromorbit.com
^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2015-02-10 21:55 UTC | newest]
Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 ` [PATCH 7/9 v5] common/log: add _get_log_configs for testing options Jaegeuk Kim
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
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.