make xfs/tests generic by introducing shutdown for filesystems
v5 cover make xfs/tests generic by introducing shutdown for filesystems
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.outSignature · 1 line
2.1.1
PATCH v5 1/9 common/rc: add _require_scratch_shtudown
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
--- 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(+)
common/rc +12 -0
@@ -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()
tests/xfs/053 +1 -0
@@ -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"
tests/xfs/085 +1 -0
@@ -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 \
tests/xfs/086 +1 -0
@@ -44,6 +44,7 @@ _supported_os IRIX Linux rm -f $seqres.full $tmp.* _require_scratch +_require_scratch_shutdown _require_v2log echo "*** init FS"
tests/xfs/087 +1 -0
@@ -59,6 +59,7 @@ _supported_os IRIX Linux rm -f $seqres.full $tmp.* _require_scratch +_require_scratch_shutdown _require_v2log _require_xfs_quota
tests/xfs/137 +1 -0
@@ -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
tests/xfs/138 +1 -0
@@ -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
tests/xfs/139 +1 -0
@@ -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
tests/xfs/140 +1 -0
@@ -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
tests/xfs/179 +1 -0
@@ -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
tests/xfs/180 +1 -0
@@ -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
tests/xfs/182 +1 -0
@@ -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
tests/xfs/200 +1 -0
@@ -45,6 +45,7 @@ _supported_fs xfs _supported_os Linux _require_scratch_nocheck +_require_scratch_shutdown _scratch_mkfs_xfs >/dev/null 2>&1
tests/xfs/306 +1 -0
@@ -49,6 +49,7 @@ _supported_fs xfs _supported_os Linux _require_scratch +_require_scratch_shutdown rm -f $seqres.full
Signature · 1 line
2.1.1
PATCH v5 2/9 common/rc: add _require_fiemap and _extent_hole_counts
In reply to Jaegeuk KimThis 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)
--- 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(-)
common/rc +13 -0
@@ -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()
tests/xfs/137 +6 -4
@@ -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
tests/xfs/138 +6 -4
@@ -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
tests/xfs/139 +6 -4
@@ -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
tests/xfs/140 +4 -2
@@ -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
tests/xfs/179 +4 -2
@@ -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
tests/xfs/180 +4 -2
@@ -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
tests/xfs/182 +4 -2
@@ -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
Signature · 1 line
2.1.1
Re: [PATCH 2/9 v5] common/rc: add _require_fiemap and _extent_hole_counts
Quoted 35 lines · 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 <[email protected]>--- 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(-)common/rc +2
-0@@ -2332,6 +2332,19 @@ _require_scratch_shutdown() _scratch_unmount } +# Does fiemap support? +_require_fiemap()
common/rc _require_scratch_shutdown() · line 2346
Quoted 10 lines
common/rc +10
-0+{ + _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.
Signature · 2 lines
Dave Chinner [email protected]
Re: [PATCH 2/9 v6] common/rc: add _require_fiemap and counting extents and holes
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)
--- 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(-)
common/rc +18 -0
@@ -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()
tests/xfs/137 +5 -4
@@ -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
tests/xfs/138 +5 -4
@@ -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
tests/xfs/139 +5 -4
@@ -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
tests/xfs/140 +3 -2
@@ -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
tests/xfs/179 +3 -2
@@ -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
tests/xfs/180 +3 -2
@@ -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
tests/xfs/182 +3 -2
@@ -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
Signature · 1 line
2.1.1
PATCH v5 3/9 common/rc: add _require_norecovery
In reply to Jaegeuk KimThis 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.
--- common/rc | 8 ++++++++ tests/xfs/200 | 1 + 2 files changed, 9 insertions(+)
common/rc +8 -0
@@ -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() {
tests/xfs/200 +1 -0
@@ -46,6 +46,7 @@ _supported_os Linux _require_scratch_nocheck _require_scratch_shutdown +_require_norecovery _scratch_mkfs_xfs >/dev/null 2>&1
Signature · 1 line
2.1.1
PATCH v5 4/9 tests/generic: relocate xfs's tests into tests/generic/
In reply to Jaegeuk KimThis 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
---
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(-)tests/generic/042 renamed from tests/xfs/053 +2 -2
@@ -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
tests/generic/042.out renamed from tests/xfs/053.out +1 -1
@@ -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)
tests/generic/043 renamed from tests/xfs/137 +4 -4
@@ -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
tests/generic/043.out new file +1 -0
@@ -0,0 +1 @@ +QA output created by 043
tests/generic/044 renamed from tests/xfs/138 +4 -4
@@ -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
tests/generic/044.out new file +1 -0
@@ -0,0 +1 @@ +QA output created by 044
tests/generic/045 renamed from tests/xfs/139 +4 -4
@@ -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
tests/generic/045.out new file +1 -0
@@ -0,0 +1 @@ +QA output created by 045
tests/generic/046 renamed from tests/xfs/140 +4 -4
@@ -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
tests/generic/046.out new file +1 -0
@@ -0,0 +1 @@ +QA output created by 046
tests/generic/047 renamed from tests/xfs/179 +3 -3
@@ -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()
tests/generic/047.out new file +1 -0
@@ -0,0 +1 @@ +QA output created by 047
tests/generic/048 renamed from tests/xfs/180 +3 -3
@@ -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
tests/generic/048.out new file +1 -0
@@ -0,0 +1 @@ +QA output created by 048
tests/generic/049 renamed from tests/xfs/182 +3 -3
@@ -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()
tests/generic/049.out new file +1 -0
@@ -0,0 +1 @@ +QA output created by 049
tests/generic/050 renamed from tests/xfs/200 +4 -4
@@ -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"
tests/generic/050.out renamed from tests/xfs/200.out +1 -1
@@ -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
tests/generic/051 renamed from tests/xfs/306 +2 -2
@@ -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
tests/generic/051.out renamed from tests/xfs/306.out +1 -1
@@ -1,2 +1,2 @@ -QA output created by 306 +QA output created by 051 No output is good. Failures are loud.
tests/generic/group +10 -0
@@ -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
tests/xfs/137.out deleted +0 -1
@@ -1 +0,0 @@ -QA output created by 137
tests/xfs/138.out deleted +0 -1
@@ -1 +0,0 @@ -QA output created by 138
tests/xfs/139.out deleted +0 -1
@@ -1 +0,0 @@ -QA output created by 139
tests/xfs/140.out deleted +0 -1
@@ -1 +0,0 @@ -QA output created by 140
tests/xfs/179.out deleted +0 -1
@@ -1 +0,0 @@ -QA output created by 179
tests/xfs/180.out deleted +0 -1
@@ -1 +0,0 @@ -QA output created by 180
tests/xfs/182.out deleted +0 -1
@@ -1 +0,0 @@ -QA output created by 182
tests/xfs/group +0 -10
@@ -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
Signature · 1 line
2.1.1
PATCH v5 5/9 common/log: define _require_logstate
In reply to Jaegeuk KimThis 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
--- 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(-)
common/config +1 -0
@@ -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`"
common/log +45 -6
65 lines not on this page · raw message
tests/xfs/085 +1 -0
@@ -48,6 +48,7 @@ rm -f $tmp.log _require_scratch _require_scratch_shutdown +_require_logstate echo "mkfs" _scratch_mkfs_xfs >>$seqres.full 2>&1 \
tests/xfs/086 +1 -0
@@ -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"
tests/xfs/087 +1 -0
@@ -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
Signature · 1 line
2.1.1
PATCH v5 6/9 xfs/086,087: remove specific testing options in output
In reply to Jaegeuk KimThis patch removes the mkfs and mount options specified in output files in xfs/086 and xfs/087.
--- 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(-)
tests/xfs/086 +1 -1
@@ -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"
tests/xfs/086.out +0 -20
@@ -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 ***
tests/xfs/087 +1 -1
@@ -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"
tests/xfs/087.out +0 -9
@@ -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 ***
Signature · 1 line
2.1.1
PATCH v5 7/9 common/log: add _get_log_configs for testing options
In reply to Jaegeuk KimThis 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.
--- common/log | 47 +++++++++++++++++++++++++++++++++++++++++++++++ tests/xfs/086 | 15 +-------------- tests/xfs/087 | 14 +------------- tests/xfs/087.out | 42 ++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 91 insertions(+), 27 deletions(-)
common/log +47 -0
@@ -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
tests/xfs/086 +1 -14
@@ -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
tests/xfs/087 +1 -13
@@ -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
tests/xfs/087.out +42 -0
45 lines not on this page · raw message
Signature · 1 line
2.1.1
PATCH v5 8/9 common/quota: give quota mount option per filesystem
In reply to Jaegeuk KimThis patch add _get_quota_option to assign the mount option selectively in:
tests/xfs/087
--- common/quota | 15 +++++++++++++++ tests/xfs/087 | 7 ++++--- 2 files changed, 19 insertions(+), 3 deletions(-)
common/quota +15 -0
@@ -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()
tests/xfs/087 +4 -3
@@ -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
Signature · 1 line
2.1.1
Re: [PATCH 8/9 v5] common/quota: give quota mount option per filesystem
Quoted 22 lines · Jaegeuk Kim
This patch add
_get_quota_optionto assign the mount option selectively in:tests/xfs/087
Signed-off-by Jaegeuk Kim <[email protected]>--- common/quota | 15 +++++++++++++++ tests/xfs/087 | 7 ++++--- 2 files changed, 19 insertions(+), 3 deletions(-)common/quota +3
-0@@ -78,6 +78,21 @@ _require_xfs_quota() } # +# give quota option accoring to the filesystems. +# +_get_quota_option()
common/quota _require_xfs_quota() · line 93
Quoted 10 lines
common/quota +10
-0+{ + 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.
Signature · 2 lines
Dave Chinner [email protected]
Re: [PATCH 8/9 v6] xfs/087: give quota mount option per filesystem
Change log from v5:
o move function into the test script
-- >8 --
This patch add _get_quota_option to assign the mount option selectively.
--- tests/xfs/087 | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-)
tests/xfs/087 +16 -3
@@ -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
Signature · 1 line
2.1.1
PATCH v5 9/9 tests/generic: relocate xfs's tests into tests/generic/
In reply to Jaegeuk KimThis patch moves the generic testcases defined in xfs into tests/generic/.
xfs/085 -> generic/052
xfs/086 -> generic/054
xfs/087 -> generic/055
---
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(-)tests/generic/052 renamed from tests/xfs/085 +3 -3
@@ -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"
tests/generic/052.out renamed from tests/xfs/085.out +1 -1
@@ -1,4 +1,4 @@ -QA output created by 085 +QA output created by 052 mkfs mount touch files
tests/generic/054 renamed from tests/xfs/086 +8 -9
@@ -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
tests/generic/054.out renamed from tests/xfs/086.out +1 -1
@@ -1,4 +1,4 @@ -QA output created by 086 +QA output created by 054 *** init FS *** mkfs ***
tests/generic/055 renamed from tests/xfs/087 +7 -8
@@ -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
tests/generic/055.out renamed from tests/xfs/087.out +1 -1
@@ -1,4 +1,4 @@ -QA output created by 087 +QA output created by 055 *** init FS *** mkfs ***
tests/generic/group +3 -0
@@ -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
tests/xfs/group +0 -3
@@ -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
Signature · 1 line
2.1.1
Quoted 10 lines · Jaegeuk Kim
Thanks to Dave. :)
Change log from v4:
o add mkfs in_require_scratch_shutdown
o add_require_fiemapand_extent_hole_counts
o add_require_logstate
o modify xfs/086,087 output rules for the generic usage
o add_get_log_configsto introduce consistent testing options
o add_get_quota_optionto define quota option for each filesystems
Quoted 2 lines
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.
Signature · 2 lines
Dave Chinner [email protected]
Quoted 14 lines · Dave Chinner
Quoted 10 lines · Jaegeuk Kim
Thanks to Dave. :)
Change log from v4:
o add mkfs in_require_scratch_shutdown
o add_require_fiemapand_extent_hole_counts
o add_require_logstate
o modify xfs/086,087 output rules for the generic usage
o add_get_log_configsto introduce consistent testing options
o add_get_quota_optionto define quota option for each filesystemsQuoted 2 lines
This patch-set modifies several existing xfs's tests to be used by generic filesystems.
Quoted 7 lines
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. :)
Quoted 7 lines
Cheers,
Dave.
Signature · 2 lines
Dave Chinner [email protected]