* Failure of xfstests test case 202
@ 2011-06-10 20:39 Chandra Seetharaman
2011-06-10 21:19 ` Christoph Hellwig
2011-06-10 21:41 ` Dave Chinner
0 siblings, 2 replies; 7+ messages in thread
From: Chandra Seetharaman @ 2011-06-10 20:39 UTC (permalink / raw)
To: XFS Mailing List
Hi all,
Test case 202 tries to create a single AG filesystem and runs xfs_repair
on it expecting it to fail.
But, when I run the test with a filesystem that is bigger than 1TB it
fails (not pleasantly) since the max AG size is 1TB.
I am thinking of the following solution, please let me know if there is
any other elegant fix.
chandra
------------------------
diff --git a/202 b/202
index cbdcb57..b871d8b 100755
--- a/202
+++ b/202
@@ -42,10 +42,12 @@ _supported_os Linux
_require_scratch
echo "== Creating single-AG filesystem =="
-_scratch_mkfs_xfs -d agcount=1 >/dev/null 2>&1
+_scratch_mkfs_xfs -d agcount=1 >/dev/null 2>&1 \
+ || _scratch_mkfs_xfs -d agcount=1 -d size=268435455b >/dev/null 2>&1
+ || _fail "!!! failed to make filesystem"
echo "== Trying to repair it (should fail) =="
-_scratch_xfs_repair
+_scratch_xfs_repair && _fail "!!! xfs_repair of single AG filesystem
succeeded"
echo "== Trying to repair it with -o force_geometry =="
_scratch_xfs_repair -o force_geometry 2>&1 | _filter_repair
-------------------------
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: Failure of xfstests test case 202
2011-06-10 20:39 Failure of xfstests test case 202 Chandra Seetharaman
@ 2011-06-10 21:19 ` Christoph Hellwig
2011-06-10 21:33 ` Chandra Seetharaman
2011-06-10 21:41 ` Dave Chinner
1 sibling, 1 reply; 7+ messages in thread
From: Christoph Hellwig @ 2011-06-10 21:19 UTC (permalink / raw)
To: Chandra Seetharaman; +Cc: XFS Mailing List
On Fri, Jun 10, 2011 at 01:39:47PM -0700, Chandra Seetharaman wrote:
> Hi all,
>
> Test case 202 tries to create a single AG filesystem and runs xfs_repair
> on it expecting it to fail.
>
> But, when I run the test with a filesystem that is bigger than 1TB it
> fails (not pleasantly) since the max AG size is 1TB.
>
> I am thinking of the following solution, please let me know if there is
> any other elegant fix.
What about:
#
# The AG size is limited to 1TB (or even less with historic xfsprogs),
# so chose a small enough filesystem to make sure we can actually create
# a single AG filesystem.
#
_scratch_mkfs_sized `expr 1024 \* 1024 \* 1024`
instead?
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Failure of xfstests test case 202
2011-06-10 21:19 ` Christoph Hellwig
@ 2011-06-10 21:33 ` Chandra Seetharaman
2011-06-11 7:07 ` Dave Chinner
0 siblings, 1 reply; 7+ messages in thread
From: Chandra Seetharaman @ 2011-06-10 21:33 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: XFS Mailing List
On Fri, 2011-06-10 at 17:19 -0400, Christoph Hellwig wrote:
> On Fri, Jun 10, 2011 at 01:39:47PM -0700, Chandra Seetharaman wrote:
> > Hi all,
> >
> > Test case 202 tries to create a single AG filesystem and runs xfs_repair
> > on it expecting it to fail.
> >
> > But, when I run the test with a filesystem that is bigger than 1TB it
> > fails (not pleasantly) since the max AG size is 1TB.
> >
> > I am thinking of the following solution, please let me know if there is
> > any other elegant fix.
>
> What about:
>
> #
> # The AG size is limited to 1TB (or even less with historic xfsprogs),
> # so chose a small enough filesystem to make sure we can actually create
> # a single AG filesystem.
> #
> _scratch_mkfs_sized `expr 1024 \* 1024 \* 1024`
>
> instead?
Good point. Here is a solution based on your suggestion, but not using
_scratch_mkfs_sized (sincein the current context we need it to take
extra option, whereas _scratch_mkfs_sized takes fixed options).
What do you think ?
----------------
diff --git a/202 b/202
index cbdcb57..b982956 100755
--- a/202
+++ b/202
@@ -41,11 +41,18 @@ _supported_os Linux
_require_scratch
+#
+# The AG size is limited to 1TB (or even less with historic xfsprogs),
+# so chose a small enough filesystem to make sure we can actually create
+# a single AG filesystem.
+#
echo "== Creating single-AG filesystem =="
-_scratch_mkfs_xfs -d agcount=1 >/dev/null 2>&1
+_scratch_mkfs_xfs -d agcount=1 -d size=$((1024*1024*1024)) >/dev/null 2>&1 \
+ || _fail "!!! failed to make filesystem with single AG"
echo "== Trying to repair it (should fail) =="
-_scratch_xfs_repair
+_scratch_xfs_repair \
+ && _fail "!!! xfs_repair of single AG filesystem succeeded. Expected to fail."
echo "== Trying to repair it with -o force_geometry =="
_scratch_xfs_repair -o force_geometry 2>&1 | _filter_repair
-----------------------
>
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: Failure of xfstests test case 202
2011-06-10 20:39 Failure of xfstests test case 202 Chandra Seetharaman
2011-06-10 21:19 ` Christoph Hellwig
@ 2011-06-10 21:41 ` Dave Chinner
2011-06-10 23:25 ` Chandra Seetharaman
1 sibling, 1 reply; 7+ messages in thread
From: Dave Chinner @ 2011-06-10 21:41 UTC (permalink / raw)
To: Chandra Seetharaman; +Cc: XFS Mailing List
On Fri, Jun 10, 2011 at 01:39:47PM -0700, Chandra Seetharaman wrote:
> Hi all,
>
> Test case 202 tries to create a single AG filesystem and runs xfs_repair
> on it expecting it to fail.
>
> But, when I run the test with a filesystem that is bigger than 1TB it
> fails (not pleasantly) since the max AG size is 1TB.
>
> I am thinking of the following solution, please let me know if there is
> any other elegant fix.
>
> chandra
> ------------------------
> diff --git a/202 b/202
> index cbdcb57..b871d8b 100755
> --- a/202
> +++ b/202
> @@ -42,10 +42,12 @@ _supported_os Linux
> _require_scratch
>
> echo "== Creating single-AG filesystem =="
> -_scratch_mkfs_xfs -d agcount=1 >/dev/null 2>&1
> +_scratch_mkfs_xfs -d agcount=1 >/dev/null 2>&1 \
> + || _scratch_mkfs_xfs -d agcount=1 -d size=268435455b >/dev/null 2>&1
> + || _fail "!!! failed to make filesystem"
Why the second mkfs attempt with a fixed block size? That will
still fail for block size > 4k. All you need to do is detect the
first attempt failed.
>
> echo "== Trying to repair it (should fail) =="
> -_scratch_xfs_repair
> +_scratch_xfs_repair && _fail "!!! xfs_repair of single AG filesystem
> succeeded"
This is not necessary - the golden image compare at the end of the
test will detect this succeeding when it shoul dbe failing.
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Failure of xfstests test case 202
2011-06-10 21:41 ` Dave Chinner
@ 2011-06-10 23:25 ` Chandra Seetharaman
2011-06-11 6:59 ` Dave Chinner
0 siblings, 1 reply; 7+ messages in thread
From: Chandra Seetharaman @ 2011-06-10 23:25 UTC (permalink / raw)
To: Dave Chinner; +Cc: XFS Mailing List
On Sat, 2011-06-11 at 07:41 +1000, Dave Chinner wrote:
> On Fri, Jun 10, 2011 at 01:39:47PM -0700, Chandra Seetharaman wrote:
> > Hi all,
> >
> > Test case 202 tries to create a single AG filesystem and runs xfs_repair
> > on it expecting it to fail.
> >
> > But, when I run the test with a filesystem that is bigger than 1TB it
> > fails (not pleasantly) since the max AG size is 1TB.
> >
> > I am thinking of the following solution, please let me know if there is
> > any other elegant fix.
> >
> > chandra
> > ------------------------
> > diff --git a/202 b/202
> > index cbdcb57..b871d8b 100755
> > --- a/202
> > +++ b/202
> > @@ -42,10 +42,12 @@ _supported_os Linux
> > _require_scratch
> >
> > echo "== Creating single-AG filesystem =="
> > -_scratch_mkfs_xfs -d agcount=1 >/dev/null 2>&1
> > +_scratch_mkfs_xfs -d agcount=1 >/dev/null 2>&1 \
> > + || _scratch_mkfs_xfs -d agcount=1 -d size=268435455b >/dev/null 2>&1
> > + || _fail "!!! failed to make filesystem"
>
> Why the second mkfs attempt with a fixed block size?
to see if the mkfs failed because the default filesystem size is too
big.
> That will
> still fail for block size > 4k.
Realized that. It should have been absolute.
> All you need to do is detect the
> first attempt failed.
But, I didn't want the test to fail, instead want it to proceed if big
filesystem was the reason for failure.
By now you might have seen my response to Christoph's email. What do you
think of that ?
>
> >
> > echo "== Trying to repair it (should fail) =="
> > -_scratch_xfs_repair
> > +_scratch_xfs_repair && _fail "!!! xfs_repair of single AG filesystem
> > succeeded"
>
> This is not necessary - the golden image compare at the end of the
> test will detect this succeeding when it shoul dbe failing.
But it is not very informative about "why" the test failed. This message
will make it clear to the user.
>
> Cheers,
>
> Dave.
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Failure of xfstests test case 202
2011-06-10 23:25 ` Chandra Seetharaman
@ 2011-06-11 6:59 ` Dave Chinner
0 siblings, 0 replies; 7+ messages in thread
From: Dave Chinner @ 2011-06-11 6:59 UTC (permalink / raw)
To: Chandra Seetharaman; +Cc: XFS Mailing List
On Fri, Jun 10, 2011 at 04:25:58PM -0700, Chandra Seetharaman wrote:
> On Sat, 2011-06-11 at 07:41 +1000, Dave Chinner wrote:
> > On Fri, Jun 10, 2011 at 01:39:47PM -0700, Chandra Seetharaman wrote:
> > > Hi all,
> > >
> > > Test case 202 tries to create a single AG filesystem and runs xfs_repair
> > > on it expecting it to fail.
> > >
> > > But, when I run the test with a filesystem that is bigger than 1TB it
> > > fails (not pleasantly) since the max AG size is 1TB.
> > >
> > > I am thinking of the following solution, please let me know if there is
> > > any other elegant fix.
> > >
> > > chandra
> > > ------------------------
> > > diff --git a/202 b/202
> > > index cbdcb57..b871d8b 100755
> > > --- a/202
> > > +++ b/202
> > > @@ -42,10 +42,12 @@ _supported_os Linux
> > > _require_scratch
> > >
> > > echo "== Creating single-AG filesystem =="
> > > -_scratch_mkfs_xfs -d agcount=1 >/dev/null 2>&1
> > > +_scratch_mkfs_xfs -d agcount=1 >/dev/null 2>&1 \
> > > + || _scratch_mkfs_xfs -d agcount=1 -d size=268435455b >/dev/null 2>&1
> > > + || _fail "!!! failed to make filesystem"
> >
> > Why the second mkfs attempt with a fixed block size?
>
> to see if the mkfs failed because the default filesystem size is too
> big.
The reason for the failure will be in the test output. If the tests
fail, you should be looking at the test output to find out why
anyway, right?
> > That will
> > still fail for block size > 4k.
>
> Realized that. It should have been absolute.
>
> > All you need to do is detect the
> > first attempt failed.
>
> But, I didn't want the test to fail, instead want it to proceed if big
> filesystem was the reason for failure.
>
> By now you might have seen my response to Christoph's email. What do you
> think of that ?
I haven't seen it yet.
> > > echo "== Trying to repair it (should fail) =="
> > > -_scratch_xfs_repair
> > > +_scratch_xfs_repair && _fail "!!! xfs_repair of single AG filesystem
> > > succeeded"
> >
> > This is not necessary - the golden image compare at the end of the
> > test will detect this succeeding when it shoul dbe failing.
>
> But it is not very informative about "why" the test failed. This message
> will make it clear to the user.
It's perfectly clear - the output says "should fail" and so if the
test is failed due to golden output mismatches due to repair
succeeding, it's pretty clear why the test failed.
http://users.on.net/~david_chinner/blog/xfstests_and_golden_output.html
--
Dave Chinner
david@fromorbit.com
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Failure of xfstests test case 202
2011-06-10 21:33 ` Chandra Seetharaman
@ 2011-06-11 7:07 ` Dave Chinner
0 siblings, 0 replies; 7+ messages in thread
From: Dave Chinner @ 2011-06-11 7:07 UTC (permalink / raw)
To: Chandra Seetharaman; +Cc: Christoph Hellwig, XFS Mailing List
On Fri, Jun 10, 2011 at 02:33:44PM -0700, Chandra Seetharaman wrote:
>
> On Fri, 2011-06-10 at 17:19 -0400, Christoph Hellwig wrote:
> > On Fri, Jun 10, 2011 at 01:39:47PM -0700, Chandra Seetharaman wrote:
> > > Hi all,
> > >
> > > Test case 202 tries to create a single AG filesystem and runs xfs_repair
> > > on it expecting it to fail.
> > >
> > > But, when I run the test with a filesystem that is bigger than 1TB it
> > > fails (not pleasantly) since the max AG size is 1TB.
> > >
> > > I am thinking of the following solution, please let me know if there is
> > > any other elegant fix.
> >
> > What about:
> >
> > #
> > # The AG size is limited to 1TB (or even less with historic xfsprogs),
> > # so chose a small enough filesystem to make sure we can actually create
> > # a single AG filesystem.
> > #
> > _scratch_mkfs_sized `expr 1024 \* 1024 \* 1024`
> >
> > instead?
>
> Good point. Here is a solution based on your suggestion, but not using
> _scratch_mkfs_sized (sincein the current context we need it to take
> extra option, whereas _scratch_mkfs_sized takes fixed options).
>
> What do you think ?
>
> ----------------
> diff --git a/202 b/202
> index cbdcb57..b982956 100755
> --- a/202
> +++ b/202
> @@ -41,11 +41,18 @@ _supported_os Linux
>
> _require_scratch
>
> +#
> +# The AG size is limited to 1TB (or even less with historic xfsprogs),
> +# so chose a small enough filesystem to make sure we can actually create
> +# a single AG filesystem.
> +#
> echo "== Creating single-AG filesystem =="
> -_scratch_mkfs_xfs -d agcount=1 >/dev/null 2>&1
> +_scratch_mkfs_xfs -d agcount=1 -d size=$((1024*1024*1024)) >/dev/null 2>&1 \
> + || _fail "!!! failed to make filesystem with single AG"
Should work for most test setups.
>
> echo "== Trying to repair it (should fail) =="
> -_scratch_xfs_repair
> +_scratch_xfs_repair \
> + && _fail "!!! xfs_repair of single AG filesystem succeeded. Expected to fail."
But as I said before, this change is not necessary.
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2011-06-11 7:07 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-10 20:39 Failure of xfstests test case 202 Chandra Seetharaman
2011-06-10 21:19 ` Christoph Hellwig
2011-06-10 21:33 ` Chandra Seetharaman
2011-06-11 7:07 ` Dave Chinner
2011-06-10 21:41 ` Dave Chinner
2011-06-10 23:25 ` Chandra Seetharaman
2011-06-11 6:59 ` Dave Chinner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox