Patchwork generic: fix check for zero range support in generic/009

login
register
mail settings
Submitter Eric Whitney
Date April 19, 2014, 7:05 p.m.
Message ID <20140419190524.GA2116@wallace>
Download mbox | patch
Permalink /patch/340490/
State Not Applicable
Headers show

Comments

Eric Whitney - April 19, 2014, 7:05 p.m.
Generic/001 fails when run on a file system that does not support byte range
zeroing.  For example, an EOPNOTSUPP failure occurs when the test is run
on a pre-3.15 extent-mapped file system.  The code in the test intended
to prevent this contains an apparent typo that results in a check for
fallocate() rather than zero range support.

Signed-off-by: Eric Whitney <enwlinux@gmail.com>
---
 tests/generic/009 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Theodore Ts'o - April 19, 2014, 9:41 p.m.
On Sat, Apr 19, 2014 at 03:05:24PM -0400, Eric Whitney wrote:
> Generic/001 fails when run on a file system that does not support byte range
> zeroing.  For example, an EOPNOTSUPP failure occurs when the test is run
> on a pre-3.15 extent-mapped file system.  The code in the test intended
> to prevent this contains an apparent typo that results in a check for
> fallocate() rather than zero range support.
> 
> Signed-off-by: Eric Whitney <enwlinux@gmail.com>

LGTM.

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

--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Dave Chinner - April 20, 2014, 12:56 a.m.
On Sat, Apr 19, 2014 at 03:05:24PM -0400, Eric Whitney wrote:
> Generic/001 fails when run on a file system that does not support byte range
> zeroing.  For example, an EOPNOTSUPP failure occurs when the test is run
> on a pre-3.15 extent-mapped file system.  The code in the test intended
> to prevent this contains an apparent typo that results in a check for
> fallocate() rather than zero range support.
> 
> Signed-off-by: Eric Whitney <enwlinux@gmail.com>
> ---
>  tests/generic/009 | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tests/generic/009 b/tests/generic/009
> index b7b0b3f..65abe3c 100644
> --- a/tests/generic/009
> +++ b/tests/generic/009
> @@ -44,7 +44,7 @@ trap "_cleanup ; exit \$status" 0 1 2 3 15
>  
>  # real QA test starts here
>  _supported_os Linux
> -_require_xfs_io_falloc "fzero"
> +_require_xfs_io_command "fzero"

There should be a helper in common/rc for this. i.e.
_require_xfs_io_fzero. There's helpers for everything else. Can you
add the helper and wire the tests up to it properly?

Cheers,

Dave.
Eric Whitney - April 21, 2014, 8:36 p.m.
* Dave Chinner <david@fromorbit.com>:
> On Sat, Apr 19, 2014 at 03:05:24PM -0400, Eric Whitney wrote:
> > Generic/001 fails when run on a file system that does not support byte range
> > zeroing.  For example, an EOPNOTSUPP failure occurs when the test is run
> > on a pre-3.15 extent-mapped file system.  The code in the test intended
> > to prevent this contains an apparent typo that results in a check for
> > fallocate() rather than zero range support.
> > 
> > Signed-off-by: Eric Whitney <enwlinux@gmail.com>
> > ---
> >  tests/generic/009 | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/tests/generic/009 b/tests/generic/009
> > index b7b0b3f..65abe3c 100644
> > --- a/tests/generic/009
> > +++ b/tests/generic/009
> > @@ -44,7 +44,7 @@ trap "_cleanup ; exit \$status" 0 1 2 3 15
> >  
> >  # real QA test starts here
> >  _supported_os Linux
> > -_require_xfs_io_falloc "fzero"
> > +_require_xfs_io_command "fzero"
> 
> There should be a helper in common/rc for this. i.e.
> _require_xfs_io_fzero. There's helpers for everything else. Can you
> add the helper and wire the tests up to it properly?
> 

Sure.  For naming consistency with the other related helper functions, it
looks like we'd want to call this _require_xfs_io_falloc_zero().  I'm happy
to change this if I'm mistaken.  Patches on the way.

Thanks,
Eric
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/tests/generic/009 b/tests/generic/009
index b7b0b3f..65abe3c 100644
--- a/tests/generic/009
+++ b/tests/generic/009
@@ -44,7 +44,7 @@  trap "_cleanup ; exit \$status" 0 1 2 3 15
 
 # real QA test starts here
 _supported_os Linux
-_require_xfs_io_falloc "fzero"
+_require_xfs_io_command "fzero"
 
 testfile=$TEST_DIR/009.$$