Linux-mtd Archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/5] xfstests: introduce ubifs in xfstests
@ 2015-07-30  6:06 Dongsheng Yang
  2015-07-30  6:06 ` [PATCH 1/5] xfstest: add ubifs support Dongsheng Yang
                   ` (4 more replies)
  0 siblings, 5 replies; 17+ messages in thread
From: Dongsheng Yang @ 2015-07-30  6:06 UTC (permalink / raw
  To: eguan, fstests, dedekind1, richard.weinberger; +Cc: linux-mtd, Dongsheng Yang

Hi all:
	This patchset introduce a subtestset for ubifs.

In kernel v4.1, we will find some cases fail for ubifs,
I have post some patch for ubifs to fix it.
[PATCH v3] ubifs: introduce UBIFS_ATIME_SUPPORT to ubifs
[PATCH] ubifs: make ubifs_[get|set]xattr atomic

And I have send a patchset to add quota in ubifs.

Then we can get a all pass:
 # ./check -ubifs
FSTYP         -- ubifs
PLATFORM      -- Linux/x86_64 atest-guest 4.1.0+
MKFS_OPTIONS  -- /dev/ubi0_1
MOUNT_OPTIONS -- -o context=system_u:object_r:nfs_t:s0 /dev/ubi0_1 /mnt/scratch

generic/001 7s ... 7s
generic/002 1s ... 1s

[...]

Passed all 70 tests


Dongsheng Yang (5):
  xfstest: add ubifs support
  xfstest: generic/219 add _require_odirect
  xfstest: generic/125 add _require_odirect
  xfstest: introduce subtestset for ubifs
  xfstest: add quota tests to ubifs

 check               |  2 ++
 common/config       |  9 ++++---
 common/quota        |  4 +--
 common/rc           |  8 ++++--
 tests/generic/125   |  1 +
 tests/generic/219   |  1 +
 tests/ubifs/001     | 71 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 tests/ubifs/001.out |  1 +
 tests/ubifs/group   |  6 +++++
 9 files changed, 95 insertions(+), 8 deletions(-)
 create mode 100755 tests/ubifs/001
 create mode 100644 tests/ubifs/001.out
 create mode 100644 tests/ubifs/group

-- 
1.8.4.2

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH 1/5] xfstest: add ubifs support
  2015-07-30  6:06 [PATCH 0/5] xfstests: introduce ubifs in xfstests Dongsheng Yang
@ 2015-07-30  6:06 ` Dongsheng Yang
  2015-08-03  4:12   ` Dave Chinner
  2015-07-30  6:06 ` [PATCH 2/5] xfstest: generic/219 add _require_odirect Dongsheng Yang
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 17+ messages in thread
From: Dongsheng Yang @ 2015-07-30  6:06 UTC (permalink / raw
  To: eguan, fstests, dedekind1, richard.weinberger; +Cc: linux-mtd, Dongsheng Yang

Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
---
 check         | 2 ++
 common/config | 9 +++++----
 common/rc     | 8 ++++++--
 3 files changed, 13 insertions(+), 6 deletions(-)

diff --git a/check b/check
index a300130..20d45f8 100755
--- a/check
+++ b/check
@@ -69,6 +69,7 @@ check options
     -nfs                test NFS
     -cifs               test CIFS
     -tmpfs              test TMPFS
+    -ubifs		test ubifs
     -l			line mode diff
     -udiff		show unified diff (default)
     -n			show me, do not run tests
@@ -207,6 +208,7 @@ while [ $# -gt 0 ]; do
 	-nfs)	FSTYP=nfs ;;
 	-cifs)	FSTYP=cifs ;;
 	-tmpfs)	FSTYP=tmpfs ;;
+	-ubifs)	FSTYP=ubifs ;;
 
 	-g)	group=$2 ; shift ;
 		GROUP_LIST="$GROUP_LIST $group"
diff --git a/common/config b/common/config
index 8e21c28..2c809b6 100644
--- a/common/config
+++ b/common/config
@@ -220,6 +220,7 @@ case "$HOSTOS" in
         export MKFS_EXT4_PROG="`set_prog_path mkfs.ext4`"
         export MKFS_UDF_PROG="`set_prog_path mkudffs`"
         export MKFS_BTRFS_PROG="`set_btrfs_mkfs_prog_path_with_opts`"
+        export MKFS_UBIFS_PROG="`set_prog_path mkfs.ubifs`"
         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`"
@@ -465,9 +466,9 @@ get_next_config() {
 		exit 1
 	fi
 
-	echo $TEST_DEV | grep -qE ":|//" > /dev/null 2>&1
+	echo $TEST_DEV | grep -qE ":|//|ubi" > /dev/null 2>&1
 	if [ ! -b "$TEST_DEV" -a "$?" != "0" ]; then
-		echo "common/config: Error: \$TEST_DEV ($TEST_DEV) is not a block device or a network filesystem"
+		echo "common/config: Error: \$TEST_DEV ($TEST_DEV) is not a block device or a network filesystem or ubi device"
 		exit 1
 	fi
 
@@ -488,9 +489,9 @@ get_next_config() {
 		export SCRATCH_DEV_NOT_SET=true
 	fi
 
-	echo $SCRATCH_DEV | grep -qE ":|//" > /dev/null 2>&1
+	echo $SCRATCH_DEV | grep -qE ":|//|ubi" > /dev/null 2>&1
 	if [ ! -z "$SCRATCH_DEV" -a ! -b "$SCRATCH_DEV" -a "$?" != "0" ]; then
-		echo "common/config: Error: \$SCRATCH_DEV ($SCRATCH_DEV) is not a block device or a network filesystem"
+		echo "common/config: Error: \$SCRATCH_DEV ($SCRATCH_DEV) is not a block device or a network filesystem or ubi device"
 		exit 1
 	fi
 
diff --git a/common/rc b/common/rc
index 610045e..b206827 100644
--- a/common/rc
+++ b/common/rc
@@ -1106,7 +1106,7 @@ _require_scratch_nocheck()
 		     _notrun "this test requires a valid \$SCRATCH_MNT"
 		fi
 		;;
-	tmpfs)
+	tmpfs|ubifs)
 		if [ -z "$SCRATCH_DEV" -o ! -d "$SCRATCH_MNT" ];
 		then
 		    _notrun "this test requires a valid \$SCRATCH_MNT and unique $SCRATCH_DEV"
@@ -1180,7 +1180,7 @@ _require_test()
 		     _notrun "this test requires a valid \$TEST_DIR"
 		fi
 		;;
-	tmpfs)
+	tmpfs|ubifs)
 		if [ -z "$TEST_DEV" -o ! -d "$TEST_DIR" ];
 		then
 		    _notrun "this test requires a valid \$TEST_DIR and unique $TEST_DEV"
@@ -2054,6 +2054,8 @@ _check_test_fs()
     tmpfs)
 	# no way to check consistency for tmpfs
 	;;
+    ubifs)
+	;;
     *)
 	_check_generic_filesystem $TEST_DEV
 	;;
@@ -2092,6 +2094,8 @@ _check_scratch_fs()
     tmpfs)
 	# no way to check consistency for tmpfs
 	;;
+    ubifs)
+	;;
     *)
 	_check_generic_filesystem $device
 	;;
-- 
1.8.4.2

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH 2/5] xfstest: generic/219 add _require_odirect
  2015-07-30  6:06 [PATCH 0/5] xfstests: introduce ubifs in xfstests Dongsheng Yang
  2015-07-30  6:06 ` [PATCH 1/5] xfstest: add ubifs support Dongsheng Yang
@ 2015-07-30  6:06 ` Dongsheng Yang
  2015-08-03  3:11   ` Eryu Guan
  2015-08-03  3:59   ` Dave Chinner
  2015-07-30  6:06 ` [PATCH 3/5] xfstest: generic/125 " Dongsheng Yang
                   ` (2 subsequent siblings)
  4 siblings, 2 replies; 17+ messages in thread
From: Dongsheng Yang @ 2015-07-30  6:06 UTC (permalink / raw
  To: eguan, fstests, dedekind1, richard.weinberger; +Cc: linux-mtd, Dongsheng Yang

generic/219 is testing quota in three use cases including
Direct I/O. So we have to add a dependence to odirect in
this test.

Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
---
 tests/generic/219 | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tests/generic/219 b/tests/generic/219
index 2b75b89..866e7b7 100755
--- a/tests/generic/219
+++ b/tests/generic/219
@@ -44,6 +44,7 @@ _supported_fs generic
 _supported_os Linux #IRIX
 _require_scratch
 _require_quota
+_require_odirect
 _require_user
 _require_group
 
-- 
1.8.4.2

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH 3/5] xfstest: generic/125 add _require_odirect
  2015-07-30  6:06 [PATCH 0/5] xfstests: introduce ubifs in xfstests Dongsheng Yang
  2015-07-30  6:06 ` [PATCH 1/5] xfstest: add ubifs support Dongsheng Yang
  2015-07-30  6:06 ` [PATCH 2/5] xfstest: generic/219 add _require_odirect Dongsheng Yang
@ 2015-07-30  6:06 ` Dongsheng Yang
  2015-08-03  3:12   ` Eryu Guan
  2015-07-30  6:06 ` [PATCH 4/5] xfstest: introduce subtestset for ubifs Dongsheng Yang
  2015-07-30  6:06 ` [PATCH 5/5] xfstest: add quota tests to ubifs Dongsheng Yang
  4 siblings, 1 reply; 17+ messages in thread
From: Dongsheng Yang @ 2015-07-30  6:06 UTC (permalink / raw
  To: eguan, fstests, dedekind1, richard.weinberger; +Cc: linux-mtd, Dongsheng Yang

generic/125 is using src/trunc which is testing O_DIRECT.
So we have to add direct dependence to this test.

Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
---
 tests/generic/125 | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tests/generic/125 b/tests/generic/125
index bcf9b3e..67eb63f 100755
--- a/tests/generic/125
+++ b/tests/generic/125
@@ -41,6 +41,7 @@ _supported_os Linux
 
 _require_test
 _require_user
+_require_odirect
 
 TESTDIR=$TEST_DIR/ftrunc
 TESTFILE=$TESTDIR/ftrunc.tmp
-- 
1.8.4.2

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH 4/5] xfstest: introduce subtestset for ubifs
  2015-07-30  6:06 [PATCH 0/5] xfstests: introduce ubifs in xfstests Dongsheng Yang
                   ` (2 preceding siblings ...)
  2015-07-30  6:06 ` [PATCH 3/5] xfstest: generic/125 " Dongsheng Yang
@ 2015-07-30  6:06 ` Dongsheng Yang
  2015-08-03  3:28   ` Eryu Guan
  2015-07-30  6:06 ` [PATCH 5/5] xfstest: add quota tests to ubifs Dongsheng Yang
  4 siblings, 1 reply; 17+ messages in thread
From: Dongsheng Yang @ 2015-07-30  6:06 UTC (permalink / raw
  To: eguan, fstests, dedekind1, richard.weinberger; +Cc: linux-mtd, Dongsheng Yang

This commit creat a subdir in tests named as ubifs for
ubifs specified tests. And introduce the ubifs/001 to
it.

Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
---
 tests/ubifs/001     | 71 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 tests/ubifs/001.out |  1 +
 tests/ubifs/group   |  6 +++++
 3 files changed, 78 insertions(+)
 create mode 100755 tests/ubifs/001
 create mode 100644 tests/ubifs/001.out
 create mode 100644 tests/ubifs/group

diff --git a/tests/ubifs/001 b/tests/ubifs/001
new file mode 100755
index 0000000..9107915
--- /dev/null
+++ b/tests/ubifs/001
@@ -0,0 +1,71 @@
+#! /bin/bash
+# FS QA Test 001
+#
+# This is a test for mkfs.ubifs, mkfs.ubifs accept a -r option
+# to build a file system from a directory. This case is testing
+# this option and check the result of it.
+#
+#-----------------------------------------------------------------------
+# Copyright (c) 2015 Dongsheng Yang <yangds.fnst@cn.fujitsu.com>.  All Rights Reserved.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation.
+#
+# This program is distributed in the hope that it would be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write the Free Software Foundation,
+# Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+#-----------------------------------------------------------------------
+#
+
+seq=`basename $0`
+seqres=$RESULT_DIR/$seq
+echo "QA output created by $seq"
+
+here=`pwd`
+tmp=`mktemp -d`
+status=1	# failure is the default!
+trap "_cleanup; exit \$status" 0 1 2 3 15
+
+_cleanup()
+{
+	cd /
+	rm -rf $tmp
+}
+
+# get standard environment, filters and checks
+. ./common/rc
+. ./common/filter
+
+# real QA test starts here
+_supported_fs ubifs
+_supported_os Linux
+_require_test
+_require_scratch
+_require_fssum
+_need_to_be_root
+
+rm -f $seqres.full
+
+rootdir=$tmp/root
+mkdir $rootdir
+
+for i in $(seq 1 10); do
+	dd if=/dev/urandom of=$rootdir/$i bs=1M count=1 >> $seqres.full 2>&1 || _fail "dd failed"
+done
+
+run_check $FSSUM_PROG -A -f -w $tmp/fssum $rootdir
+
+_scratch_mkfs "-r $rootdir" >/dev/null 2>&1
+_scratch_mount
+
+run_check $FSSUM_PROG -r $tmp/fssum $SCRATCH_MNT 2>> $seqres.full
+
+# success, all done
+status=0
+exit
diff --git a/tests/ubifs/001.out b/tests/ubifs/001.out
new file mode 100644
index 0000000..097d046
--- /dev/null
+++ b/tests/ubifs/001.out
@@ -0,0 +1 @@
+QA output created by 001
diff --git a/tests/ubifs/group b/tests/ubifs/group
new file mode 100644
index 0000000..45516bc
--- /dev/null
+++ b/tests/ubifs/group
@@ -0,0 +1,6 @@
+# QA groups control
+#
+# define groups and default group owners
+# do not start group name with a digit
+#
+001 auto quick mkfs
-- 
1.8.4.2

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH 5/5] xfstest: add quota tests to ubifs
  2015-07-30  6:06 [PATCH 0/5] xfstests: introduce ubifs in xfstests Dongsheng Yang
                   ` (3 preceding siblings ...)
  2015-07-30  6:06 ` [PATCH 4/5] xfstest: introduce subtestset for ubifs Dongsheng Yang
@ 2015-07-30  6:06 ` Dongsheng Yang
  4 siblings, 0 replies; 17+ messages in thread
From: Dongsheng Yang @ 2015-07-30  6:06 UTC (permalink / raw
  To: eguan, fstests, dedekind1, richard.weinberger; +Cc: linux-mtd, Dongsheng Yang

Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
---
 common/quota | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/common/quota b/common/quota
index 23be4f8..b0b1eef 100644
--- a/common/quota
+++ b/common/quota
@@ -29,7 +29,7 @@ _require_quota()
     [ -n $QUOTA_PROG ] || _notrun "Quota user tools not installed"
 
     case $FSTYP in
-    ext2|ext3|ext4|ext4dev|reiserfs)
+    ubifs|ext2|ext3|ext4|ext4dev|reiserfs)
 	if [ ! -d /proc/sys/fs/quota ]; then
 	    _notrun "Installed kernel does not support quotas"
 	fi
@@ -213,7 +213,7 @@ _check_quota_usage()
 
 	VFS_QUOTA=0
 	case $FSTYP in
-	ext2|ext3|ext4|ext4dev|reiserfs|gfs2)
+	ubifs|ext2|ext3|ext4|ext4dev|reiserfs|gfs2)
 		VFS_QUOTA=1
 		quotaon -f -u -g $SCRATCH_MNT 2>/dev/null
 		;;
-- 
1.8.4.2

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* Re: [PATCH 2/5] xfstest: generic/219 add _require_odirect
  2015-07-30  6:06 ` [PATCH 2/5] xfstest: generic/219 add _require_odirect Dongsheng Yang
@ 2015-08-03  3:11   ` Eryu Guan
  2015-08-03  3:59   ` Dave Chinner
  1 sibling, 0 replies; 17+ messages in thread
From: Eryu Guan @ 2015-08-03  3:11 UTC (permalink / raw
  To: Dongsheng Yang; +Cc: fstests, dedekind1, richard.weinberger, linux-mtd

On Thu, Jul 30, 2015 at 02:06:54PM +0800, Dongsheng Yang wrote:
> generic/219 is testing quota in three use cases including
> Direct I/O. So we have to add a dependence to odirect in
> this test.
> 
> Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>

Reviewed-by: Eryu Guan <eguan@redhat.com>

> ---
>  tests/generic/219 | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/tests/generic/219 b/tests/generic/219
> index 2b75b89..866e7b7 100755
> --- a/tests/generic/219
> +++ b/tests/generic/219
> @@ -44,6 +44,7 @@ _supported_fs generic
>  _supported_os Linux #IRIX
>  _require_scratch
>  _require_quota
> +_require_odirect
>  _require_user
>  _require_group
>  
> -- 
> 1.8.4.2
> 

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 3/5] xfstest: generic/125 add _require_odirect
  2015-07-30  6:06 ` [PATCH 3/5] xfstest: generic/125 " Dongsheng Yang
@ 2015-08-03  3:12   ` Eryu Guan
  0 siblings, 0 replies; 17+ messages in thread
From: Eryu Guan @ 2015-08-03  3:12 UTC (permalink / raw
  To: Dongsheng Yang; +Cc: fstests, dedekind1, richard.weinberger, linux-mtd

On Thu, Jul 30, 2015 at 02:06:55PM +0800, Dongsheng Yang wrote:
> generic/125 is using src/trunc which is testing O_DIRECT.
> So we have to add direct dependence to this test.
> 
> Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>

Reviewed-by: Eryu Guan <eguan@redhat.com>

> ---
>  tests/generic/125 | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/tests/generic/125 b/tests/generic/125
> index bcf9b3e..67eb63f 100755
> --- a/tests/generic/125
> +++ b/tests/generic/125
> @@ -41,6 +41,7 @@ _supported_os Linux
>  
>  _require_test
>  _require_user
> +_require_odirect
>  
>  TESTDIR=$TEST_DIR/ftrunc
>  TESTFILE=$TESTDIR/ftrunc.tmp
> -- 
> 1.8.4.2
> 
> --
> To unsubscribe from this list: send the line "unsubscribe fstests" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 4/5] xfstest: introduce subtestset for ubifs
  2015-07-30  6:06 ` [PATCH 4/5] xfstest: introduce subtestset for ubifs Dongsheng Yang
@ 2015-08-03  3:28   ` Eryu Guan
  2015-08-03  5:12     ` Dongsheng Yang
  0 siblings, 1 reply; 17+ messages in thread
From: Eryu Guan @ 2015-08-03  3:28 UTC (permalink / raw
  To: Dongsheng Yang; +Cc: fstests, dedekind1, richard.weinberger, linux-mtd

On Thu, Jul 30, 2015 at 02:06:56PM +0800, Dongsheng Yang wrote:
> This commit creat a subdir in tests named as ubifs for
> ubifs specified tests. And introduce the ubifs/001 to
> it.

I know nothing about ubifs, so I can only comment from the fstests's
point of view, better to have someone from ubifs community to review
too. The same is true to patch 1/5 and 5/5 (they both look fine to me).

> 
> Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
> ---
>  tests/ubifs/001     | 71 +++++++++++++++++++++++++++++++++++++++++++++++++++++
>  tests/ubifs/001.out |  1 +
>  tests/ubifs/group   |  6 +++++
>  3 files changed, 78 insertions(+)
>  create mode 100755 tests/ubifs/001
>  create mode 100644 tests/ubifs/001.out
>  create mode 100644 tests/ubifs/group
> 
> diff --git a/tests/ubifs/001 b/tests/ubifs/001
> new file mode 100755
> index 0000000..9107915
> --- /dev/null
> +++ b/tests/ubifs/001
> @@ -0,0 +1,71 @@
> +#! /bin/bash
> +# FS QA Test 001
> +#
> +# This is a test for mkfs.ubifs, mkfs.ubifs accept a -r option
> +# to build a file system from a directory. This case is testing
> +# this option and check the result of it.
> +#
> +#-----------------------------------------------------------------------
> +# Copyright (c) 2015 Dongsheng Yang <yangds.fnst@cn.fujitsu.com>.  All Rights Reserved.
> +#
> +# This program is free software; you can redistribute it and/or
> +# modify it under the terms of the GNU General Public License as
> +# published by the Free Software Foundation.
> +#
> +# This program is distributed in the hope that it would be useful,
> +# but WITHOUT ANY WARRANTY; without even the implied warranty of
> +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> +# GNU General Public License for more details.
> +#
> +# You should have received a copy of the GNU General Public License
> +# along with this program; if not, write the Free Software Foundation,
> +# Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
> +#-----------------------------------------------------------------------
> +#
> +
> +seq=`basename $0`
> +seqres=$RESULT_DIR/$seq
> +echo "QA output created by $seq"
> +
> +here=`pwd`
> +tmp=`mktemp -d`

Please follow the template created by 'new', tmp=/tmp/$$, because $tmp
is widely used by internal functions from common/rc and check.

> +status=1	# failure is the default!
> +trap "_cleanup; exit \$status" 0 1 2 3 15
> +
> +_cleanup()
> +{
> +	cd /
> +	rm -rf $tmp

rm -f $tmp.*

This will clean all tmp files used by this test, including the ones from
common/rc and check.

> +}
> +
> +# get standard environment, filters and checks
> +. ./common/rc
> +. ./common/filter
> +
> +# real QA test starts here
> +_supported_fs ubifs
> +_supported_os Linux
> +_require_test
> +_require_scratch
> +_require_fssum
> +_need_to_be_root
> +
> +rm -f $seqres.full
> +
> +rootdir=$tmp/root

Usually we create tmp mount point in $TEST_DIR, e.g.

rootdir=$TEST_DIR/$seq.mnt

not sure if this is doable for ubifs

> +mkdir $rootdir

echo "Silence is golden"

to indicate this test expects no output

> +
> +for i in $(seq 1 10); do
> +	dd if=/dev/urandom of=$rootdir/$i bs=1M count=1 >> $seqres.full 2>&1 || _fail "dd failed"
> +done
> +
> +run_check $FSSUM_PROG -A -f -w $tmp/fssum $rootdir
> +
> +_scratch_mkfs "-r $rootdir" >/dev/null 2>&1

dump the stdout and stderr to $seqres.full too?

Thanks,
Eryu
> +_scratch_mount
> +
> +run_check $FSSUM_PROG -r $tmp/fssum $SCRATCH_MNT 2>> $seqres.full
> +
> +# success, all done
> +status=0
> +exit
> diff --git a/tests/ubifs/001.out b/tests/ubifs/001.out
> new file mode 100644
> index 0000000..097d046
> --- /dev/null
> +++ b/tests/ubifs/001.out
> @@ -0,0 +1 @@
> +QA output created by 001
> diff --git a/tests/ubifs/group b/tests/ubifs/group
> new file mode 100644
> index 0000000..45516bc
> --- /dev/null
> +++ b/tests/ubifs/group
> @@ -0,0 +1,6 @@
> +# QA groups control
> +#
> +# define groups and default group owners
> +# do not start group name with a digit
> +#
> +001 auto quick mkfs
> -- 
> 1.8.4.2
> 
> --
> To unsubscribe from this list: send the line "unsubscribe fstests" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 2/5] xfstest: generic/219 add _require_odirect
  2015-07-30  6:06 ` [PATCH 2/5] xfstest: generic/219 add _require_odirect Dongsheng Yang
  2015-08-03  3:11   ` Eryu Guan
@ 2015-08-03  3:59   ` Dave Chinner
  2015-08-03  5:01     ` Dongsheng Yang
  1 sibling, 1 reply; 17+ messages in thread
From: Dave Chinner @ 2015-08-03  3:59 UTC (permalink / raw
  To: Dongsheng Yang; +Cc: eguan, fstests, dedekind1, richard.weinberger, linux-mtd

On Thu, Jul 30, 2015 at 02:06:54PM +0800, Dongsheng Yang wrote:
> generic/219 is testing quota in three use cases including
> Direct I/O. So we have to add a dependence to odirect in
> this test.

Hmmm - you've modified on only 2 tests here in this patch series
that use direct IO. There are many more - just looking for direct IO
comments, these generic tests use direct IO in some way, and there
are others that such usage is not obvious (e.g. this patch to
generic/219):

generic/091
generic/113
generic/130
generic/214
generic/224
generic/263
shared/272

And all the aio/dio tests:

generic/036
generic/198
generic/207
generic/208
generic/209
generic/210
generic/211
generic/212
generic/239
generic/240
generic/323

And there are others that run fio that uses DIO, too, like

generic/299
generic/300

And so on. I haven't even looked at all the fsx tests that might
use DIO, and I know that some of them are not listed above...

On the whole, I think ubifs would be better to implement DIO via
buffered fallback that to make us have to annotate every test that
uses DIO in some way...

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 1/5] xfstest: add ubifs support
  2015-07-30  6:06 ` [PATCH 1/5] xfstest: add ubifs support Dongsheng Yang
@ 2015-08-03  4:12   ` Dave Chinner
  2015-08-03  4:44     ` Dongsheng Yang
  0 siblings, 1 reply; 17+ messages in thread
From: Dave Chinner @ 2015-08-03  4:12 UTC (permalink / raw
  To: Dongsheng Yang; +Cc: eguan, fstests, dedekind1, richard.weinberger, linux-mtd

On Thu, Jul 30, 2015 at 02:06:53PM +0800, Dongsheng Yang wrote:
> Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
> ---
>  check         | 2 ++
>  common/config | 9 +++++----
>  common/rc     | 8 ++++++--
>  3 files changed, 13 insertions(+), 6 deletions(-)
> 
> diff --git a/check b/check
> index a300130..20d45f8 100755
> --- a/check
> +++ b/check
> @@ -69,6 +69,7 @@ check options
>      -nfs                test NFS
>      -cifs               test CIFS
>      -tmpfs              test TMPFS
> +    -ubifs		test ubifs
>      -l			line mode diff
>      -udiff		show unified diff (default)
>      -n			show me, do not run tests
> @@ -207,6 +208,7 @@ while [ $# -gt 0 ]; do
>  	-nfs)	FSTYP=nfs ;;
>  	-cifs)	FSTYP=cifs ;;
>  	-tmpfs)	FSTYP=tmpfs ;;
> +	-ubifs)	FSTYP=ubifs ;;

It's a local device - we should be able to probe it to find FSTYP
like we do with all other local devices. Probing is much preferable
to adding more FS specific CLI options....

> diff --git a/common/config b/common/config
> index 8e21c28..2c809b6 100644
> --- a/common/config
> +++ b/common/config
> @@ -220,6 +220,7 @@ case "$HOSTOS" in
>          export MKFS_EXT4_PROG="`set_prog_path mkfs.ext4`"
>          export MKFS_UDF_PROG="`set_prog_path mkudffs`"
>          export MKFS_BTRFS_PROG="`set_btrfs_mkfs_prog_path_with_opts`"
> +        export MKFS_UBIFS_PROG="`set_prog_path mkfs.ubifs`"
>          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`"
> @@ -465,9 +466,9 @@ get_next_config() {
>  		exit 1
>  	fi
>  
> -	echo $TEST_DEV | grep -qE ":|//" > /dev/null 2>&1
> +	echo $TEST_DEV | grep -qE ":|//|ubi" > /dev/null 2>&1
>  	if [ ! -b "$TEST_DEV" -a "$?" != "0" ]; then
> -		echo "common/config: Error: \$TEST_DEV ($TEST_DEV) is not a block device or a network filesystem"
> +		echo "common/config: Error: \$TEST_DEV ($TEST_DEV) is not a block device or a network filesystem or ubi device"
>  		exit 1
>  	fi
>  
> @@ -488,9 +489,9 @@ get_next_config() {
>  		export SCRATCH_DEV_NOT_SET=true
>  	fi
>  
> -	echo $SCRATCH_DEV | grep -qE ":|//" > /dev/null 2>&1
> +	echo $SCRATCH_DEV | grep -qE ":|//|ubi" > /dev/null 2>&1
>  	if [ ! -z "$SCRATCH_DEV" -a ! -b "$SCRATCH_DEV" -a "$?" != "0" ]; then
> -		echo "common/config: Error: \$SCRATCH_DEV ($SCRATCH_DEV) is not a block device or a network filesystem"
> +		echo "common/config: Error: \$SCRATCH_DEV ($SCRATCH_DEV) is not a block device or a network filesystem or ubi device"
>  		exit 1
>  	fi

Hmmm - how do we validate that we were passed a valid ubi device in
TEST_DEV/SCRATCH_DEV? (goes back to the probing question above...)

> diff --git a/common/rc b/common/rc
> index 610045e..b206827 100644
> --- a/common/rc
> +++ b/common/rc
> @@ -1106,7 +1106,7 @@ _require_scratch_nocheck()
>  		     _notrun "this test requires a valid \$SCRATCH_MNT"
>  		fi
>  		;;
> -	tmpfs)
> +	tmpfs|ubifs)
>  		if [ -z "$SCRATCH_DEV" -o ! -d "$SCRATCH_MNT" ];
>  		then
>  		    _notrun "this test requires a valid \$SCRATCH_MNT and unique $SCRATCH_DEV"
> @@ -1180,7 +1180,7 @@ _require_test()
>  		     _notrun "this test requires a valid \$TEST_DIR"
>  		fi
>  		;;
> -	tmpfs)
> +	tmpfs|ubifs)
>  		if [ -z "$TEST_DEV" -o ! -d "$TEST_DIR" ];
>  		then
>  		    _notrun "this test requires a valid \$TEST_DIR and unique $TEST_DEV"
> @@ -2054,6 +2054,8 @@ _check_test_fs()
>      tmpfs)
>  	# no way to check consistency for tmpfs
>  	;;
> +    ubifs)
> +	;;
>      *)
>  	_check_generic_filesystem $TEST_DEV
>  	;;
> @@ -2092,6 +2094,8 @@ _check_scratch_fs()
>      tmpfs)
>  	# no way to check consistency for tmpfs
>  	;;
> +    ubifs)
> +	;;

There is no fsck.ubifs? How do you validate the filesystem is
consistent?

Keep in minds that the people you are asking to review/commit this
code have no idea what UBIFS is or how it works, so you need to
explain why xfstests requires non-standard configuration and
bypassing of the config sanity testing...

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 1/5] xfstest: add ubifs support
  2015-08-03  4:12   ` Dave Chinner
@ 2015-08-03  4:44     ` Dongsheng Yang
  2015-08-03  4:47       ` Dongsheng Yang
  2015-08-03  5:51       ` Dave Chinner
  0 siblings, 2 replies; 17+ messages in thread
From: Dongsheng Yang @ 2015-08-03  4:44 UTC (permalink / raw
  To: Dave Chinner; +Cc: eguan, fstests, dedekind1, richard.weinberger, linux-mtd

On 08/03/2015 12:12 PM, Dave Chinner wrote:
> On Thu, Jul 30, 2015 at 02:06:53PM +0800, Dongsheng Yang wrote:
>> Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
>> ---
>>   check         | 2 ++
>>   common/config | 9 +++++----
>>   common/rc     | 8 ++++++--
>>   3 files changed, 13 insertions(+), 6 deletions(-)
>>
>> diff --git a/check b/check
>> index a300130..20d45f8 100755
>> --- a/check
>> +++ b/check
>> @@ -69,6 +69,7 @@ check options
>>       -nfs                test NFS
>>       -cifs               test CIFS
>>       -tmpfs              test TMPFS
>> +    -ubifs		test ubifs
>>       -l			line mode diff
>>       -udiff		show unified diff (default)
>>       -n			show me, do not run tests
>> @@ -207,6 +208,7 @@ while [ $# -gt 0 ]; do
>>   	-nfs)	FSTYP=nfs ;;
>>   	-cifs)	FSTYP=cifs ;;
>>   	-tmpfs)	FSTYP=tmpfs ;;
>> +	-ubifs)	FSTYP=ubifs ;;
>
> It's a local device - we should be able to probe it to find FSTYP
> like we do with all other local devices. Probing is much preferable
> to adding more FS specific CLI options....

That's true, it's not necessary, I agree probing is better.
I will remove this line in next version.
>
>> diff --git a/common/config b/common/config
>> index 8e21c28..2c809b6 100644
>> --- a/common/config
>> +++ b/common/config
>> @@ -220,6 +220,7 @@ case "$HOSTOS" in
>>           export MKFS_EXT4_PROG="`set_prog_path mkfs.ext4`"
>>           export MKFS_UDF_PROG="`set_prog_path mkudffs`"
>>           export MKFS_BTRFS_PROG="`set_btrfs_mkfs_prog_path_with_opts`"
>> +        export MKFS_UBIFS_PROG="`set_prog_path mkfs.ubifs`"
>>           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`"
>> @@ -465,9 +466,9 @@ get_next_config() {
>>   		exit 1
>>   	fi
>>
>> -	echo $TEST_DEV | grep -qE ":|//" > /dev/null 2>&1
>> +	echo $TEST_DEV | grep -qE ":|//|ubi" > /dev/null 2>&1
>>   	if [ ! -b "$TEST_DEV" -a "$?" != "0" ]; then
>> -		echo "common/config: Error: \$TEST_DEV ($TEST_DEV) is not a block device or a network filesystem"
>> +		echo "common/config: Error: \$TEST_DEV ($TEST_DEV) is not a block device or a network filesystem or ubi device"
>>   		exit 1
>>   	fi
>>
>> @@ -488,9 +489,9 @@ get_next_config() {
>>   		export SCRATCH_DEV_NOT_SET=true
>>   	fi
>>
>> -	echo $SCRATCH_DEV | grep -qE ":|//" > /dev/null 2>&1
>> +	echo $SCRATCH_DEV | grep -qE ":|//|ubi" > /dev/null 2>&1
>>   	if [ ! -z "$SCRATCH_DEV" -a ! -b "$SCRATCH_DEV" -a "$?" != "0" ]; then
>> -		echo "common/config: Error: \$SCRATCH_DEV ($SCRATCH_DEV) is not a block device or a network filesystem"
>> +		echo "common/config: Error: \$SCRATCH_DEV ($SCRATCH_DEV) is not a block device or a network filesystem or ubi device"
>>   		exit 1
>>   	fi
>
> Hmmm - how do we validate that we were passed a valid ubi device in
> TEST_DEV/SCRATCH_DEV? (goes back to the probing question above...)

I am using the following config for my testing. So if we want to
test ubifs, we have to pass a ubi volume to it. the name of it
looks as ubiX_X.

# cat local.config
# Ideally define at least these 4 to match your environment
# The first 2 are required.
# See README for other variables which can be set.
#
# Note: SCRATCH_DEV >will< get overwritten!

export TEST_DEV=/dev/ubi0_0
export TEST_DIR=/mnt/test
export SCRATCH_DEV=/dev/ubi0_1
export SCRATCH_MNT=/mnt/scratch

>
>> diff --git a/common/rc b/common/rc
>> index 610045e..b206827 100644
>> --- a/common/rc
>> +++ b/common/rc
>> @@ -1106,7 +1106,7 @@ _require_scratch_nocheck()
>>   		     _notrun "this test requires a valid \$SCRATCH_MNT"
>>   		fi
>>   		;;
>> -	tmpfs)
>> +	tmpfs|ubifs)
>>   		if [ -z "$SCRATCH_DEV" -o ! -d "$SCRATCH_MNT" ];
>>   		then
>>   		    _notrun "this test requires a valid \$SCRATCH_MNT and unique $SCRATCH_DEV"
>> @@ -1180,7 +1180,7 @@ _require_test()
>>   		     _notrun "this test requires a valid \$TEST_DIR"
>>   		fi
>>   		;;
>> -	tmpfs)
>> +	tmpfs|ubifs)
>>   		if [ -z "$TEST_DEV" -o ! -d "$TEST_DIR" ];
>>   		then
>>   		    _notrun "this test requires a valid \$TEST_DIR and unique $TEST_DEV"
>> @@ -2054,6 +2054,8 @@ _check_test_fs()
>>       tmpfs)
>>   	# no way to check consistency for tmpfs
>>   	;;
>> +    ubifs)
>> +	;;
>>       *)
>>   	_check_generic_filesystem $TEST_DEV
>>   	;;
>> @@ -2092,6 +2094,8 @@ _check_scratch_fs()
>>       tmpfs)
>>   	# no way to check consistency for tmpfs
>>   	;;
>> +    ubifs)
>> +	;;
>
> There is no fsck.ubifs? How do you validate the filesystem is
> consistent?
>
> Keep in minds that the people you are asking to review/commit this
> code have no idea what UBIFS is or how it works, so you need to
> explain why xfstests requires non-standard configuration and
> bypassing of the config sanity testing...
>
> Cheers,
>
> Dave.
>

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 1/5] xfstest: add ubifs support
  2015-08-03  4:44     ` Dongsheng Yang
@ 2015-08-03  4:47       ` Dongsheng Yang
  2015-08-03  5:51       ` Dave Chinner
  1 sibling, 0 replies; 17+ messages in thread
From: Dongsheng Yang @ 2015-08-03  4:47 UTC (permalink / raw
  To: Dave Chinner; +Cc: eguan, fstests, dedekind1, richard.weinberger, linux-mtd

Sorry, I click "send" to early. :(

On 08/03/2015 12:44 PM, Dongsheng Yang wrote:
> On 08/03/2015 12:12 PM, Dave Chinner wrote:
>> On Thu, Jul 30, 2015 at 02:06:53PM +0800, Dongsheng Yang wrote:
>>> Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
>>> ---
>>>   check         | 2 ++
>>>   common/config | 9 +++++----
[...]
>>>       # no way to check consistency for tmpfs
>>>       ;;
>>> +    ubifs)
>>> +    ;;
>>
>> There is no fsck.ubifs? How do you validate the filesystem is
>> consistent?

Yes, currently, we have no fsck.ubifs, but I am planing to add it.
>>
>> Keep in minds that the people you are asking to review/commit this
>> code have no idea what UBIFS is or how it works, so you need to
>> explain why xfstests requires non-standard configuration and
>> bypassing of the config sanity testing...

There is a document for ubifs, the main reason for this patchset is
ubifs is running on ubi volume which is not a block device.

http://www.linux-mtd.infradead.org/doc/ubifs.html

Thanx
Yang
>>
>> Cheers,
>>
>> Dave.
>>
>
> --
> To unsubscribe from this list: send the line "unsubscribe fstests" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> .
>

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 2/5] xfstest: generic/219 add _require_odirect
  2015-08-03  3:59   ` Dave Chinner
@ 2015-08-03  5:01     ` Dongsheng Yang
  2015-08-03  5:55       ` Dave Chinner
  0 siblings, 1 reply; 17+ messages in thread
From: Dongsheng Yang @ 2015-08-03  5:01 UTC (permalink / raw
  To: Dave Chinner; +Cc: eguan, fstests, dedekind1, richard.weinberger, linux-mtd

On 08/03/2015 11:59 AM, Dave Chinner wrote:
> On Thu, Jul 30, 2015 at 02:06:54PM +0800, Dongsheng Yang wrote:
>> generic/219 is testing quota in three use cases including
>> Direct I/O. So we have to add a dependence to odirect in
>> this test.
>
> Hmmm - you've modified on only 2 tests here in this patch series
> that use direct IO. There are many more - just looking for direct IO
> comments, these generic tests use direct IO in some way, and there
> are others that such usage is not obvious (e.g. this patch to
> generic/219):
>
> generic/091
> generic/113
> generic/130
> generic/214
> generic/224
> generic/263
> shared/272
>
> And all the aio/dio tests:
>
> generic/036
> generic/198
> generic/207
> generic/208
> generic/209
> generic/210
> generic/211
> generic/212
> generic/239
> generic/240
> generic/323
>
> And there are others that run fio that uses DIO, too, like
>
> generic/299
> generic/300
>
> And so on. I haven't even looked at all the fsx tests that might
> use DIO, and I know that some of them are not listed above...
>
> On the whole, I think ubifs would be better to implement DIO via
> buffered fallback that to make us have to annotate every test that
> uses DIO in some way...

Fair point. Yes, It's difficult to find out all the tests which would 
use DIO.

And we are discussing about dio in ubifs.

So if you are strongly rejecting this kind of change, I will drop
this patch in my next version.

Thanx
Yang
>
> Cheers,
>
> Dave.
>

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 4/5] xfstest: introduce subtestset for ubifs
  2015-08-03  3:28   ` Eryu Guan
@ 2015-08-03  5:12     ` Dongsheng Yang
  0 siblings, 0 replies; 17+ messages in thread
From: Dongsheng Yang @ 2015-08-03  5:12 UTC (permalink / raw
  To: Eryu Guan; +Cc: fstests, dedekind1, richard.weinberger, linux-mtd

On 08/03/2015 11:28 AM, Eryu Guan wrote:
> On Thu, Jul 30, 2015 at 02:06:56PM +0800, Dongsheng Yang wrote:
>> This commit creat a subdir in tests named as ubifs for
>> ubifs specified tests. And introduce the ubifs/001 to
>> it.
>
> I know nothing about ubifs, so I can only comment from the fstests's
> point of view, better to have someone from ubifs community to review
> too. The same is true to patch 1/5 and 5/5 (they both look fine to me).
>
>>
>> Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
>> ---
>>   tests/ubifs/001     | 71 +++++++++++++++++++++++++++++++++++++++++++++++++++++
>>   tests/ubifs/001.out |  1 +
>>   tests/ubifs/group   |  6 +++++
>>   3 files changed, 78 insertions(+)
>>   create mode 100755 tests/ubifs/001
>>   create mode 100644 tests/ubifs/001.out
>>   create mode 100644 tests/ubifs/group
>>
>> diff --git a/tests/ubifs/001 b/tests/ubifs/001
>> new file mode 100755
>> index 0000000..9107915
>> --- /dev/null
>> +++ b/tests/ubifs/001
>> @@ -0,0 +1,71 @@
>> +#! /bin/bash
>> +# FS QA Test 001
>> +#
>> +# This is a test for mkfs.ubifs, mkfs.ubifs accept a -r option
>> +# to build a file system from a directory. This case is testing
>> +# this option and check the result of it.
>> +#
>> +#-----------------------------------------------------------------------
>> +# Copyright (c) 2015 Dongsheng Yang <yangds.fnst@cn.fujitsu.com>.  All Rights Reserved.
>> +#
>> +# This program is free software; you can redistribute it and/or
>> +# modify it under the terms of the GNU General Public License as
>> +# published by the Free Software Foundation.
>> +#
>> +# This program is distributed in the hope that it would be useful,
>> +# but WITHOUT ANY WARRANTY; without even the implied warranty of
>> +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
>> +# GNU General Public License for more details.
>> +#
>> +# You should have received a copy of the GNU General Public License
>> +# along with this program; if not, write the Free Software Foundation,
>> +# Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
>> +#-----------------------------------------------------------------------
>> +#
>> +
>> +seq=`basename $0`
>> +seqres=$RESULT_DIR/$seq
>> +echo "QA output created by $seq"
>> +
>> +here=`pwd`
>> +tmp=`mktemp -d`
>
> Please follow the template created by 'new', tmp=/tmp/$$, because $tmp
> is widely used by internal functions from common/rc and check.

I copied it from btrfs/038, And I need a temp dir for my testing,
so I chose the mktemp -d. If I use tmp=/tmp/$$, I would get a temp file
rather than a dir. So do you have any suggestion in this case?
>
>> +status=1	# failure is the default!
>> +trap "_cleanup; exit \$status" 0 1 2 3 15
>> +
>> +_cleanup()
>> +{
>> +	cd /
>> +	rm -rf $tmp
>
> rm -f $tmp.*
>
> This will clean all tmp files used by this test, including the ones from
> common/rc and check.
>
>> +}
>> +
>> +# get standard environment, filters and checks
>> +. ./common/rc
>> +. ./common/filter
>> +
>> +# real QA test starts here
>> +_supported_fs ubifs
>> +_supported_os Linux
>> +_require_test
>> +_require_scratch
>> +_require_fssum
>> +_need_to_be_root
>> +
>> +rm -f $seqres.full
>> +
>> +rootdir=$tmp/root
>
> Usually we create tmp mount point in $TEST_DIR, e.g.
>
> rootdir=$TEST_DIR/$seq.mnt
>
> not sure if this is doable for ubifs

Actually, rootdir is not a mount point, it's a temp
dir and I would create something it it. And mkfs.ubifs
can initialize a ubifs which contain the same data in
rootdir if you pass "-r $roodir".
>
>> +mkdir $rootdir
>
> echo "Silence is golden"
>
> to indicate this test expects no output

okey
>
>> +
>> +for i in $(seq 1 10); do
>> +	dd if=/dev/urandom of=$rootdir/$i bs=1M count=1 >> $seqres.full 2>&1 || _fail "dd failed"
>> +done
>> +
>> +run_check $FSSUM_PROG -A -f -w $tmp/fssum $rootdir
>> +
>> +_scratch_mkfs "-r $rootdir" >/dev/null 2>&1
>
> dump the stdout and stderr to $seqres.full too?

I think verify the all data in rootdir and initialized ubifs is enough.

Thanx
Yang
>
> Thanks,
> Eryu
>> +_scratch_mount
>> +
>> +run_check $FSSUM_PROG -r $tmp/fssum $SCRATCH_MNT 2>> $seqres.full
>> +
>> +# success, all done
>> +status=0
>> +exit
>> diff --git a/tests/ubifs/001.out b/tests/ubifs/001.out
>> new file mode 100644
>> index 0000000..097d046
>> --- /dev/null
>> +++ b/tests/ubifs/001.out
>> @@ -0,0 +1 @@
>> +QA output created by 001
>> diff --git a/tests/ubifs/group b/tests/ubifs/group
>> new file mode 100644
>> index 0000000..45516bc
>> --- /dev/null
>> +++ b/tests/ubifs/group
>> @@ -0,0 +1,6 @@
>> +# QA groups control
>> +#
>> +# define groups and default group owners
>> +# do not start group name with a digit
>> +#
>> +001 auto quick mkfs
>> --
>> 1.8.4.2
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe fstests" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> --
> To unsubscribe from this list: send the line "unsubscribe fstests" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> .
>

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 1/5] xfstest: add ubifs support
  2015-08-03  4:44     ` Dongsheng Yang
  2015-08-03  4:47       ` Dongsheng Yang
@ 2015-08-03  5:51       ` Dave Chinner
  1 sibling, 0 replies; 17+ messages in thread
From: Dave Chinner @ 2015-08-03  5:51 UTC (permalink / raw
  To: Dongsheng Yang; +Cc: eguan, fstests, dedekind1, richard.weinberger, linux-mtd

On Mon, Aug 03, 2015 at 12:44:19PM +0800, Dongsheng Yang wrote:
> On 08/03/2015 12:12 PM, Dave Chinner wrote:
> >On Thu, Jul 30, 2015 at 02:06:53PM +0800, Dongsheng Yang wrote:
> >>-	echo $TEST_DEV | grep -qE ":|//" > /dev/null 2>&1
> >>+	echo $TEST_DEV | grep -qE ":|//|ubi" > /dev/null 2>&1
> >>  	if [ ! -b "$TEST_DEV" -a "$?" != "0" ]; then
> >>-		echo "common/config: Error: \$TEST_DEV ($TEST_DEV) is not a block device or a network filesystem"
> >>+		echo "common/config: Error: \$TEST_DEV ($TEST_DEV) is not a block device or a network filesystem or ubi device"
> >>  		exit 1
> >>  	fi
> >>
> >>@@ -488,9 +489,9 @@ get_next_config() {
> >>  		export SCRATCH_DEV_NOT_SET=true
> >>  	fi
> >>
> >>-	echo $SCRATCH_DEV | grep -qE ":|//" > /dev/null 2>&1
> >>+	echo $SCRATCH_DEV | grep -qE ":|//|ubi" > /dev/null 2>&1
> >>  	if [ ! -z "$SCRATCH_DEV" -a ! -b "$SCRATCH_DEV" -a "$?" != "0" ]; then
> >>-		echo "common/config: Error: \$SCRATCH_DEV ($SCRATCH_DEV) is not a block device or a network filesystem"
> >>+		echo "common/config: Error: \$SCRATCH_DEV ($SCRATCH_DEV) is not a block device or a network filesystem or ubi device"
> >>  		exit 1
> >>  	fi
> >
> >Hmmm - how do we validate that we were passed a valid ubi device in
> >TEST_DEV/SCRATCH_DEV? (goes back to the probing question above...)
> 
> I am using the following config for my testing. So if we want to
> test ubifs, we have to pass a ubi volume to it. the name of it
> looks as ubiX_X.
> 
> # cat local.config
> # Ideally define at least these 4 to match your environment
> # The first 2 are required.
> # See README for other variables which can be set.
> #
> # Note: SCRATCH_DEV >will< get overwritten!
> 
> export TEST_DEV=/dev/ubi0_0
> export TEST_DIR=/mnt/test
> export SCRATCH_DEV=/dev/ubi0_1
> export SCRATCH_MNT=/mnt/scratch

So if we see /dev/ubi???? then we should check that it's a char
device to confirm it is what we think it should be?

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 2/5] xfstest: generic/219 add _require_odirect
  2015-08-03  5:01     ` Dongsheng Yang
@ 2015-08-03  5:55       ` Dave Chinner
  0 siblings, 0 replies; 17+ messages in thread
From: Dave Chinner @ 2015-08-03  5:55 UTC (permalink / raw
  To: Dongsheng Yang; +Cc: eguan, fstests, dedekind1, richard.weinberger, linux-mtd

On Mon, Aug 03, 2015 at 01:01:22PM +0800, Dongsheng Yang wrote:
> On 08/03/2015 11:59 AM, Dave Chinner wrote:
> >On Thu, Jul 30, 2015 at 02:06:54PM +0800, Dongsheng Yang wrote:
> >>generic/219 is testing quota in three use cases including
> >>Direct I/O. So we have to add a dependence to odirect in
> >>this test.
> >
> >Hmmm - you've modified on only 2 tests here in this patch series
> >that use direct IO. There are many more - just looking for direct IO
> >comments, these generic tests use direct IO in some way, and there
> >are others that such usage is not obvious (e.g. this patch to
> >generic/219):
> >
> >generic/091
> >generic/113
> >generic/130
> >generic/214
> >generic/224
> >generic/263
> >shared/272
> >
> >And all the aio/dio tests:
> >
> >generic/036
> >generic/198
> >generic/207
> >generic/208
> >generic/209
> >generic/210
> >generic/211
> >generic/212
> >generic/239
> >generic/240
> >generic/323
> >
> >And there are others that run fio that uses DIO, too, like
> >
> >generic/299
> >generic/300
> >
> >And so on. I haven't even looked at all the fsx tests that might
> >use DIO, and I know that some of them are not listed above...
> >
> >On the whole, I think ubifs would be better to implement DIO via
> >buffered fallback that to make us have to annotate every test that
> >uses DIO in some way...
> 
> Fair point. Yes, It's difficult to find out all the tests which
> would use DIO.
> 
> And we are discussing about dio in ubifs.
> 
> So if you are strongly rejecting this kind of change, I will drop
> this patch in my next version.

I would say "strongy rejecting", more advising a different approach
to solve the problem.  i.e. with a "return 0" ->direct_IO method,
applications that use direct IO won't randomly fail or refuse to
run.  That seems like a much better (and simpler!) solution compared
to chasing down applications that use direct IO and changing
them....

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2015-08-03  5:56 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-30  6:06 [PATCH 0/5] xfstests: introduce ubifs in xfstests Dongsheng Yang
2015-07-30  6:06 ` [PATCH 1/5] xfstest: add ubifs support Dongsheng Yang
2015-08-03  4:12   ` Dave Chinner
2015-08-03  4:44     ` Dongsheng Yang
2015-08-03  4:47       ` Dongsheng Yang
2015-08-03  5:51       ` Dave Chinner
2015-07-30  6:06 ` [PATCH 2/5] xfstest: generic/219 add _require_odirect Dongsheng Yang
2015-08-03  3:11   ` Eryu Guan
2015-08-03  3:59   ` Dave Chinner
2015-08-03  5:01     ` Dongsheng Yang
2015-08-03  5:55       ` Dave Chinner
2015-07-30  6:06 ` [PATCH 3/5] xfstest: generic/125 " Dongsheng Yang
2015-08-03  3:12   ` Eryu Guan
2015-07-30  6:06 ` [PATCH 4/5] xfstest: introduce subtestset for ubifs Dongsheng Yang
2015-08-03  3:28   ` Eryu Guan
2015-08-03  5:12     ` Dongsheng Yang
2015-07-30  6:06 ` [PATCH 5/5] xfstest: add quota tests to ubifs Dongsheng Yang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).