All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] some random fixes and cleanups
@ 2016-01-11 11:32 Eryu Guan
  2016-01-11 11:32 ` [PATCH 1/3] generic/23[23]: some cleanups Eryu Guan
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Eryu Guan @ 2016-01-11 11:32 UTC (permalink / raw)
  To: fstests; +Cc: Eryu Guan

Just some random fixes and cleanups.

Eryu Guan (3):
  generic/23[23]: some cleanups
  common: no need to parse config file in new
  new: create a default .out file

 common/config     |  5 +++++
 new               |  6 ++++++
 tests/generic/232 | 17 ++++-------------
 tests/generic/233 | 20 ++++----------------
 4 files changed, 19 insertions(+), 29 deletions(-)

-- 
2.5.0


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

* [PATCH 1/3] generic/23[23]: some cleanups
  2016-01-11 11:32 [PATCH 0/3] some random fixes and cleanups Eryu Guan
@ 2016-01-11 11:32 ` Eryu Guan
  2016-01-11 11:32 ` [PATCH 2/3] common: no need to parse config file in new Eryu Guan
  2016-01-11 11:32 ` [PATCH 3/3] new: create a default .out file Eryu Guan
  2 siblings, 0 replies; 5+ messages in thread
From: Eryu Guan @ 2016-01-11 11:32 UTC (permalink / raw)
  To: fstests; +Cc: Eryu Guan

1. remove $seqres.full before test
2. no need to check return values of _fsstress and _check_quota_usage
   calls, the golden image could catch the failures.
3. remove unused FSX related variables

Signed-off-by: Eryu Guan <eguan@redhat.com>
---
 tests/generic/232 | 17 ++++-------------
 tests/generic/233 | 20 ++++----------------
 2 files changed, 8 insertions(+), 29 deletions(-)

diff --git a/tests/generic/232 b/tests/generic/232
index b3f6b7e..1323809 100755
--- a/tests/generic/232
+++ b/tests/generic/232
@@ -71,23 +71,14 @@ _require_scratch
 _require_quota
 _need_to_be_root
 
-_scratch_mkfs >> $seqres.full 2>&1
+_scratch_mkfs > $seqres.full 2>&1
 _scratch_mount "-o usrquota,grpquota"
 chmod 777 $SCRATCH_MNT
 quotacheck -u -g $SCRATCH_MNT 2>/dev/null
 quotaon -u -g $SCRATCH_MNT 2>/dev/null
 
-if ! _fsstress; then
-	_scratch_unmount 2>/dev/null
-	exit
-fi
-
-if ! _check_quota_usage; then
-	_scratch_unmount 2>/dev/null
-	status=1
-	exit
-fi
-
-_scratch_unmount 2>/dev/null
+_fsstress
+_check_quota_usage
+_scratch_unmount
 status=0
 exit
diff --git a/tests/generic/233 b/tests/generic/233
index 95255f8..d50d280 100755
--- a/tests/generic/233
+++ b/tests/generic/233
@@ -38,9 +38,6 @@ trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
 . ./common/filter
 . ./common/quota
 
-FSX_FILE_SIZE=64000000
-FSX_ARGS="-q -l $FSX_FILE_SIZE -o 65536 -S 191110531 -N 100000"
-
 _filter_num()
 {
 	tee -a $seqres.full |\
@@ -79,24 +76,15 @@ _require_quota
 _require_user
 _need_to_be_root
 
-_scratch_mkfs >> $seqres.full 2>&1
+_scratch_mkfs > $seqres.full 2>&1
 _scratch_mount "-o usrquota,grpquota"
 chmod 777 $SCRATCH_MNT
 quotacheck -u -g $SCRATCH_MNT 2>/dev/null
 quotaon -u -g $SCRATCH_MNT 2>/dev/null
 setquota -u $qa_user 32000 32000 1000 1000 $SCRATCH_MNT 2>/dev/null
 
-if ! _fsstress; then
-	_scratch_unmount 2>/dev/null
-	exit
-fi
-
-if ! _check_quota_usage; then
-	_scratch_unmount 2>/dev/null
-	status=1
-	exit
-fi
-
-_scratch_unmount 2>/dev/null
+_fsstress
+_check_quota_usage
+_scratch_unmount
 status=0
 exit
-- 
2.5.0


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

* [PATCH 2/3] common: no need to parse config file in new
  2016-01-11 11:32 [PATCH 0/3] some random fixes and cleanups Eryu Guan
  2016-01-11 11:32 ` [PATCH 1/3] generic/23[23]: some cleanups Eryu Guan
@ 2016-01-11 11:32 ` Eryu Guan
  2016-01-12  8:31   ` [PATCH v2] " Eryu Guan
  2016-01-11 11:32 ` [PATCH 3/3] new: create a default .out file Eryu Guan
  2 siblings, 1 reply; 5+ messages in thread
From: Eryu Guan @ 2016-01-11 11:32 UTC (permalink / raw)
  To: fstests; +Cc: Eryu Guan

I saw "new" failed the TEST_DIR/SCRATCH_MNT validation when TEST_DIR or
SCRATCH_MNT points to directory, which is needed in overlayfs testing.

"new" only generates test template and doesn't need common/config to
parse and validate TEST_DEV/TEST_DIR etc., so just returns after setting
all needed commands.

Signed-off-by: Eryu Guan <eguan@redhat.com>
---
 common/config | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/common/config b/common/config
index cb34fd7..9aa06a3 100644
--- a/common/config
+++ b/common/config
@@ -270,6 +270,11 @@ fi
 rm -f /tmp/crc_check.img
 export XFS_MKFS_HAS_NO_META_SUPPORT
 
+# new doesn't need config file parsed, we can stop here
+if [ "$iam" == "new" ]; then
+	return 0
+fi
+
 _mount_opts()
 {
 	case $FSTYP in
-- 
2.5.0


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

* [PATCH 3/3] new: create a default .out file
  2016-01-11 11:32 [PATCH 0/3] some random fixes and cleanups Eryu Guan
  2016-01-11 11:32 ` [PATCH 1/3] generic/23[23]: some cleanups Eryu Guan
  2016-01-11 11:32 ` [PATCH 2/3] common: no need to parse config file in new Eryu Guan
@ 2016-01-11 11:32 ` Eryu Guan
  2 siblings, 0 replies; 5+ messages in thread
From: Eryu Guan @ 2016-01-11 11:32 UTC (permalink / raw)
  To: fstests; +Cc: Eryu Guan

Creating a default .out file in "new" to ease the new test creation
process.

Signed-off-by: Eryu Guan <eguan@redhat.com>
---
 new | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/new b/new
index ab2af69..c21d8db 100755
--- a/new
+++ b/new
@@ -228,6 +228,12 @@ echo ""
 chmod 755 $tdir/$id
 ${EDITOR-vi} $tdir/$id
 
+# Create default .out file
+cat <<End-of-File >$tdir/$id.out
+QA output created by $id
+Silence is golden
+End-of-File
+
 if [ $# -eq 0 ]
 then
 
-- 
2.5.0


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

* [PATCH v2] common: no need to parse config file in new
  2016-01-11 11:32 ` [PATCH 2/3] common: no need to parse config file in new Eryu Guan
@ 2016-01-12  8:31   ` Eryu Guan
  0 siblings, 0 replies; 5+ messages in thread
From: Eryu Guan @ 2016-01-12  8:31 UTC (permalink / raw)
  To: fstests; +Cc: Eryu Guan

I saw "new" failed the TEST_DEV/SCRATCH_DEV validation when TEST_DEV or
SCRATCH_DEV points to directory, which is needed in overlayfs testing.

"new" only generates test template and doesn't need common/config to
parse and validate TEST_DEV/SCRATCH_DEV etc., so just returns after
setting all needed commands.

Signed-off-by: Eryu Guan <eguan@redhat.com>
---
v2:
- update commit log, s/_DIR/_DEV/

 common/config | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/common/config b/common/config
index cb34fd7..9aa06a3 100644
--- a/common/config
+++ b/common/config
@@ -270,6 +270,11 @@ fi
 rm -f /tmp/crc_check.img
 export XFS_MKFS_HAS_NO_META_SUPPORT
 
+# new doesn't need config file parsed, we can stop here
+if [ "$iam" == "new" ]; then
+	return 0
+fi
+
 _mount_opts()
 {
 	case $FSTYP in
-- 
2.5.0


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

end of thread, other threads:[~2016-01-12  8:31 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-11 11:32 [PATCH 0/3] some random fixes and cleanups Eryu Guan
2016-01-11 11:32 ` [PATCH 1/3] generic/23[23]: some cleanups Eryu Guan
2016-01-11 11:32 ` [PATCH 2/3] common: no need to parse config file in new Eryu Guan
2016-01-12  8:31   ` [PATCH v2] " Eryu Guan
2016-01-11 11:32 ` [PATCH 3/3] new: create a default .out file Eryu Guan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.