public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] Skip _check_test_fs unless a test is actually run
@ 2009-06-19 17:53 Theodore Ts'o
  2009-06-19 17:53 ` [PATCH 2/3] Fix common.config to allow SCRATCH_DEV and SCRATCH_MNT to be optional Theodore Ts'o
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Theodore Ts'o @ 2009-06-19 17:53 UTC (permalink / raw)
  To: xfs; +Cc: tytso

Running _check_test_fs can take a non-trivial amount of time, and if a
test has been skipped because it doesn't work on Linux, or it doesn't
work of for ext4, it's pointless to re-run _check_test_fs.  So move
the call to _check_test_fs so it is only run if a test is actually run.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
---
 check |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/check b/check
index 545c010..1aae528 100755
--- a/check
+++ b/check
@@ -308,10 +308,10 @@ do
     then
 	try="$try $seq"
 	n_try=`expr $n_try + 1`
+        _check_test_fs
     fi
     
     seq="after_$seq"
-    _check_test_fs
 done
 
 interrupt=false
-- 
1.6.3.2.1.gb9f7d.dirty

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

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

* [PATCH 2/3] Fix common.config to allow SCRATCH_DEV and SCRATCH_MNT to be optional
  2009-06-19 17:53 [PATCH 1/3] Skip _check_test_fs unless a test is actually run Theodore Ts'o
@ 2009-06-19 17:53 ` Theodore Ts'o
  2009-06-20 17:15   ` Christoph Hellwig
  2009-06-19 17:53 ` [PATCH 3/3] Fix _require_scratch test for extN, resierfs, gfs2, and btrfs Theodore Ts'o
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 9+ messages in thread
From: Theodore Ts'o @ 2009-06-19 17:53 UTC (permalink / raw)
  To: xfs; +Cc: tytso

Commit 3ae9f2f8 purports to allow SCRATCH_DEV and SCRATCH_MNT to be
optional, but tests in common.config will cause check to exit with an
error if these environment variables are not defined.  Fix this problem.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
---
 common.config |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/common.config b/common.config
index 64df893..b304247 100644
--- a/common.config
+++ b/common.config
@@ -23,10 +23,10 @@
 #                   mounted XFS file system, needs to be be world
 #                   writeable
 # TEST_DEV -        device for file system containing TEST_DIR
-# SCRATCH_DEV -     device you can make a scratch file system on
-# SCRATCH_MNT -     mount point for scratch file system
 #
 # and optionally:
+# SCRATCH_DEV -     device you can make a scratch file system on
+# SCRATCH_MNT -     mount point for scratch file system
 # SCRATCH_LOGDEV -  scratch log device for external log testing
 # SCRATCH_RTDEV -   scratch rt dev
 # TEST_LOGDEV -     test log device for external log testing
@@ -202,8 +202,8 @@ known_hosts()
   [ -z "$TEST_DIR" ]       && MC="$MC TEST_DIR"
   [ -z "$TEST_DEV" ]       && MC="$MC TEST_DEV"
 
-  [ -z "$SCRATCH_MNT" ]    && MC="$MC SCRATCH_MNT"
-  [ -z "$SCRATCH_DEV" ]    && MC="$MC SCRATCH_DEV"
+#  [ -z "$SCRATCH_MNT" ]    && MC="$MC SCRATCH_MNT"
+#  [ -z "$SCRATCH_DEV" ]    && MC="$MC SCRATCH_DEV"
 
   [ "$MC" ] && (echo "Warning: need to define parameters for host $HOST";\
 	        echo "       or set variables:"; \
-- 
1.6.3.2.1.gb9f7d.dirty

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

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

* [PATCH 3/3] Fix _require_scratch test for extN, resierfs, gfs2, and btrfs
  2009-06-19 17:53 [PATCH 1/3] Skip _check_test_fs unless a test is actually run Theodore Ts'o
  2009-06-19 17:53 ` [PATCH 2/3] Fix common.config to allow SCRATCH_DEV and SCRATCH_MNT to be optional Theodore Ts'o
@ 2009-06-19 17:53 ` Theodore Ts'o
  2009-06-19 19:16   ` Felix Blyakher
  2009-06-19 19:05 ` [PATCH 1/3] Skip _check_test_fs unless a test is actually run Felix Blyakher
  2009-06-20 17:02 ` Christoph Hellwig
  3 siblings, 1 reply; 9+ messages in thread
From: Theodore Ts'o @ 2009-06-19 17:53 UTC (permalink / raw)
  To: xfs; +Cc: tytso

The extN, reiserfs, gfs2, and btrfs filesysytem types should use the
same check for a block device as XFS and UDF, and not the test for
NFS, which was checking for host:/foo/bar/baz when checking for a
scratch device.

Also, the NFS logic was also incorrect, in that it would allow a
zero-length SCRATCH_DEV to continue.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
---
 common.rc |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/common.rc b/common.rc
index 581cfba..8b9ba7d 100644
--- a/common.rc
+++ b/common.rc
@@ -593,7 +593,7 @@ _supported_os()
 _require_scratch()
 {
     case "$FSTYP" in
-	xfs|udf)
+	xfs|udf|ext2|ext3|ext4|reiserfs|gfs2|btrfs)
 		 if [ -z "$SCRATCH_DEV" -o "`_is_block_dev $SCRATCH_DEV`" = "" ]
 		 then
 		     _notrun "this test requires a valid \$SCRATCH_DEV"
@@ -603,7 +603,7 @@ _require_scratch()
 		     _notrun "this test requires a valid \$SCRATCH_DEV"
 		 fi
 		 ;;
-	nfs*|ext2|ext3|ext4|reiserfs|gfs2|btrfs)
+	nfs*)
 		 echo $SCRATCH_DEV | grep -q ":" > /dev/null 2>&1
 		 if [ ! -z "$SCRATCH_DEV" -a ! -b "$SCRATCH_DEV" -a "$?" != "0" ]
 		 then
-- 
1.6.3.2.1.gb9f7d.dirty

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

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

* Re: [PATCH 1/3] Skip _check_test_fs unless a test is actually run
  2009-06-19 17:53 [PATCH 1/3] Skip _check_test_fs unless a test is actually run Theodore Ts'o
  2009-06-19 17:53 ` [PATCH 2/3] Fix common.config to allow SCRATCH_DEV and SCRATCH_MNT to be optional Theodore Ts'o
  2009-06-19 17:53 ` [PATCH 3/3] Fix _require_scratch test for extN, resierfs, gfs2, and btrfs Theodore Ts'o
@ 2009-06-19 19:05 ` Felix Blyakher
  2009-06-20 17:02 ` Christoph Hellwig
  3 siblings, 0 replies; 9+ messages in thread
From: Felix Blyakher @ 2009-06-19 19:05 UTC (permalink / raw)
  To: Theodore Ts'o; +Cc: xfs


On Jun 19, 2009, at 12:53 PM, Theodore Ts'o wrote:

> Running _check_test_fs can take a non-trivial amount of time, and if a
> test has been skipped because it doesn't work on Linux, or it doesn't
> work of for ext4, it's pointless to re-run _check_test_fs.  So move
> the call to _check_test_fs so it is only run if a test is actually  
> run.

Definitely makes sense.

> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>

Reviewed-by: Felix Blyakher <felixb@sgi.com>

>
> ---
> check |    2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/check b/check
> index 545c010..1aae528 100755
> --- a/check
> +++ b/check
> @@ -308,10 +308,10 @@ do
>     then
> 	try="$try $seq"
> 	n_try=`expr $n_try + 1`
> +        _check_test_fs
>     fi
>
>     seq="after_$seq"
> -    _check_test_fs
> done
>
> interrupt=false
> -- 
> 1.6.3.2.1.gb9f7d.dirty
>
> _______________________________________________
> xfs mailing list
> xfs@oss.sgi.com
> http://oss.sgi.com/mailman/listinfo/xfs

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

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

* Re: [PATCH 3/3] Fix _require_scratch test for extN, resierfs, gfs2, and btrfs
  2009-06-19 17:53 ` [PATCH 3/3] Fix _require_scratch test for extN, resierfs, gfs2, and btrfs Theodore Ts'o
@ 2009-06-19 19:16   ` Felix Blyakher
  2009-06-19 20:28     ` [PATCH] " Theodore Ts'o
  0 siblings, 1 reply; 9+ messages in thread
From: Felix Blyakher @ 2009-06-19 19:16 UTC (permalink / raw)
  To: Theodore Ts'o; +Cc: xfs


On Jun 19, 2009, at 12:53 PM, Theodore Ts'o wrote:

> The extN, reiserfs, gfs2, and btrfs filesysytem types should use the
> same check for a block device as XFS and UDF, and not the test for
> NFS, which was checking for host:/foo/bar/baz when checking for a
> scratch device.
>
> Also, the NFS logic was also incorrect, in that it would allow a
> zero-length SCRATCH_DEV to continue.

This part wasn't addressed in the patch, right?

> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>

Reviewed-by: Felix Blyakher <felixb@sgi.com>

>
> ---
> common.rc |    4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/common.rc b/common.rc
> index 581cfba..8b9ba7d 100644
> --- a/common.rc
> +++ b/common.rc
> @@ -593,7 +593,7 @@ _supported_os()
> _require_scratch()
> {
>     case "$FSTYP" in
> -	xfs|udf)
> +	xfs|udf|ext2|ext3|ext4|reiserfs|gfs2|btrfs)
> 		 if [ -z "$SCRATCH_DEV" -o "`_is_block_dev $SCRATCH_DEV`" = "" ]
> 		 then
> 		     _notrun "this test requires a valid \$SCRATCH_DEV"
> @@ -603,7 +603,7 @@ _require_scratch()
> 		     _notrun "this test requires a valid \$SCRATCH_DEV"
> 		 fi
> 		 ;;
> -	nfs*|ext2|ext3|ext4|reiserfs|gfs2|btrfs)
> +	nfs*)
> 		 echo $SCRATCH_DEV | grep -q ":" > /dev/null 2>&1
> 		 if [ ! -z "$SCRATCH_DEV" -a ! -b "$SCRATCH_DEV" -a "$?" != "0" ]
> 		 then
> -- 
> 1.6.3.2.1.gb9f7d.dirty
>
> _______________________________________________
> xfs mailing list
> xfs@oss.sgi.com
> http://oss.sgi.com/mailman/listinfo/xfs

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

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

* [PATCH] Fix _require_scratch test for extN, resierfs, gfs2, and btrfs
  2009-06-19 19:16   ` Felix Blyakher
@ 2009-06-19 20:28     ` Theodore Ts'o
  2009-06-20 17:07       ` Christoph Hellwig
  0 siblings, 1 reply; 9+ messages in thread
From: Theodore Ts'o @ 2009-06-19 20:28 UTC (permalink / raw)
  To: xfs; +Cc: Theodore Ts'o

The extN, reiserfs, gfs2, and btrfs filesysytem types should use the
same check for a block device as XFS and UDF, and not the test for
NFS, which was checking for host:/foo/bar/baz when checking for a
scratch device.

Also, the NFS logic was also incorrect, in that it would allow a
zero-length SCRATCH_DEV to continue.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
---

Oops, I sent the wrong version of the patch earlier.  Sorry about that!!

      	     	       	       	  - Ted
 common.rc |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/common.rc b/common.rc
index 581cfba..cfab2cd 100644
--- a/common.rc
+++ b/common.rc
@@ -593,7 +593,7 @@ _supported_os()
 _require_scratch()
 {
     case "$FSTYP" in
-	xfs|udf)
+	xfs|udf|ext2|ext3|ext4|reiserfs|gfs2|btrfs)
 		 if [ -z "$SCRATCH_DEV" -o "`_is_block_dev $SCRATCH_DEV`" = "" ]
 		 then
 		     _notrun "this test requires a valid \$SCRATCH_DEV"
@@ -603,9 +603,9 @@ _require_scratch()
 		     _notrun "this test requires a valid \$SCRATCH_DEV"
 		 fi
 		 ;;
-	nfs*|ext2|ext3|ext4|reiserfs|gfs2|btrfs)
+	nfs*)
 		 echo $SCRATCH_DEV | grep -q ":" > /dev/null 2>&1
-		 if [ ! -z "$SCRATCH_DEV" -a ! -b "$SCRATCH_DEV" -a "$?" != "0" ]
+		 if [ -z "$SCRATCH_DEV" -o "$?" != "0" ]
 		 then
 		     _notrun "this test requires a valid \$SCRATCH_DEV"
 		 fi
-- 
1.6.3.2.1.gb9f7d.dirty

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

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

* Re: [PATCH 1/3] Skip _check_test_fs unless a test is actually run
  2009-06-19 17:53 [PATCH 1/3] Skip _check_test_fs unless a test is actually run Theodore Ts'o
                   ` (2 preceding siblings ...)
  2009-06-19 19:05 ` [PATCH 1/3] Skip _check_test_fs unless a test is actually run Felix Blyakher
@ 2009-06-20 17:02 ` Christoph Hellwig
  3 siblings, 0 replies; 9+ messages in thread
From: Christoph Hellwig @ 2009-06-20 17:02 UTC (permalink / raw)
  To: Theodore Ts'o; +Cc: xfs

On Fri, Jun 19, 2009 at 01:53:31PM -0400, Theodore Ts'o wrote:
> Running _check_test_fs can take a non-trivial amount of time, and if a
> test has been skipped because it doesn't work on Linux, or it doesn't
> work of for ext4, it's pointless to re-run _check_test_fs.  So move
> the call to _check_test_fs so it is only run if a test is actually run.

Thanks, I've put this in.

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

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

* Re: [PATCH] Fix _require_scratch test for extN, resierfs, gfs2, and btrfs
  2009-06-19 20:28     ` [PATCH] " Theodore Ts'o
@ 2009-06-20 17:07       ` Christoph Hellwig
  0 siblings, 0 replies; 9+ messages in thread
From: Christoph Hellwig @ 2009-06-20 17:07 UTC (permalink / raw)
  To: Theodore Ts'o; +Cc: xfs

On Fri, Jun 19, 2009 at 04:28:21PM -0400, Theodore Ts'o wrote:
> The extN, reiserfs, gfs2, and btrfs filesysytem types should use the
> same check for a block device as XFS and UDF, and not the test for
> NFS, which was checking for host:/foo/bar/baz when checking for a
> scratch device.
> 
> Also, the NFS logic was also incorrect, in that it would allow a
> zero-length SCRATCH_DEV to continue.

Thanks, I've applied this with a small modification to make the local
disk case the default in the case statement so that we don't have to
touch this function when adding support for additional local
filesystems.

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

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

* Re: [PATCH 2/3] Fix common.config to allow SCRATCH_DEV and SCRATCH_MNT to be optional
  2009-06-19 17:53 ` [PATCH 2/3] Fix common.config to allow SCRATCH_DEV and SCRATCH_MNT to be optional Theodore Ts'o
@ 2009-06-20 17:15   ` Christoph Hellwig
  0 siblings, 0 replies; 9+ messages in thread
From: Christoph Hellwig @ 2009-06-20 17:15 UTC (permalink / raw)
  To: Theodore Ts'o; +Cc: xfs

On Fri, Jun 19, 2009 at 01:53:32PM -0400, Theodore Ts'o wrote:
> Commit 3ae9f2f8 purports to allow SCRATCH_DEV and SCRATCH_MNT to be
> optional, but tests in common.config will cause check to exit with an
> error if these environment variables are not defined.  Fix this problem.
> 
> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>

Thanks, I've put this in.

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

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

end of thread, other threads:[~2009-06-20 17:15 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-19 17:53 [PATCH 1/3] Skip _check_test_fs unless a test is actually run Theodore Ts'o
2009-06-19 17:53 ` [PATCH 2/3] Fix common.config to allow SCRATCH_DEV and SCRATCH_MNT to be optional Theodore Ts'o
2009-06-20 17:15   ` Christoph Hellwig
2009-06-19 17:53 ` [PATCH 3/3] Fix _require_scratch test for extN, resierfs, gfs2, and btrfs Theodore Ts'o
2009-06-19 19:16   ` Felix Blyakher
2009-06-19 20:28     ` [PATCH] " Theodore Ts'o
2009-06-20 17:07       ` Christoph Hellwig
2009-06-19 19:05 ` [PATCH 1/3] Skip _check_test_fs unless a test is actually run Felix Blyakher
2009-06-20 17:02 ` Christoph Hellwig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox