diff mbox series

[v2,5/6] generic/531: Check for O_TMPFILE

Message ID 20230424141042.450535-6-dhowells@redhat.com (mailing list archive)
State New, archived
Headers show
Series xfstests: Add support for using xfstests to test AFS | expand

Commit Message

David Howells April 24, 2023, 2:10 p.m. UTC
Make generic/531 check that the filesystem under test supports O_TMPFILE
before attempting to test it.

Signed-off-by: David Howells <dhowells@redhat.com>
cc: linux-afs@lists.infradead.org
---
 tests/generic/531 | 1 +
 1 file changed, 1 insertion(+)

Comments

Zorro Lang April 26, 2023, 2:49 p.m. UTC | #1
On Mon, Apr 24, 2023 at 03:10:41PM +0100, David Howells wrote:
> Make generic/531 check that the filesystem under test supports O_TMPFILE
> before attempting to test it.
> 
> Signed-off-by: David Howells <dhowells@redhat.com>
> cc: linux-afs@lists.infradead.org
> ---
>  tests/generic/531 | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/tests/generic/531 b/tests/generic/531
> index 5e84ca97..e5f3dddd 100755
> --- a/tests/generic/531
> +++ b/tests/generic/531
> @@ -20,6 +20,7 @@ testfile=$TEST_DIR/$seq.txt
>  # real QA test starts here
>  _supported_fs generic
>  _require_scratch
> +_require_xfs_io_command "-T"

Make sense,

Reviewed-by: Zorro Lang <zlang@redhat.com>

>  _require_test_program "t_open_tmpfiles"
>  
>  _scratch_mkfs >> $seqres.full 2>&1
>
Zorro Lang April 26, 2023, 2:51 p.m. UTC | #2
On Wed, Apr 26, 2023 at 10:49:31PM +0800, Zorro Lang wrote:
> On Mon, Apr 24, 2023 at 03:10:41PM +0100, David Howells wrote:
> > Make generic/531 check that the filesystem under test supports O_TMPFILE
> > before attempting to test it.
> > 
> > Signed-off-by: David Howells <dhowells@redhat.com>
> > cc: linux-afs@lists.infradead.org
> > ---
> >  tests/generic/531 | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/tests/generic/531 b/tests/generic/531
> > index 5e84ca97..e5f3dddd 100755
> > --- a/tests/generic/531
> > +++ b/tests/generic/531
> > @@ -20,6 +20,7 @@ testfile=$TEST_DIR/$seq.txt
> >  # real QA test starts here
> >  _supported_fs generic
> >  _require_scratch
> > +_require_xfs_io_command "-T"
> 
> Make sense,
> 
> Reviewed-by: Zorro Lang <zlang@redhat.com>

Oh, generic/530 is similar with 531, why only 531 need this one?

> 
> >  _require_test_program "t_open_tmpfiles"
> >  
> >  _scratch_mkfs >> $seqres.full 2>&1
> >
Darrick J. Wong April 26, 2023, 2:54 p.m. UTC | #3
On Wed, Apr 26, 2023 at 10:51:49PM +0800, Zorro Lang wrote:
> On Wed, Apr 26, 2023 at 10:49:31PM +0800, Zorro Lang wrote:
> > On Mon, Apr 24, 2023 at 03:10:41PM +0100, David Howells wrote:
> > > Make generic/531 check that the filesystem under test supports O_TMPFILE
> > > before attempting to test it.
> > > 
> > > Signed-off-by: David Howells <dhowells@redhat.com>
> > > cc: linux-afs@lists.infradead.org
> > > ---
> > >  tests/generic/531 | 1 +
> > >  1 file changed, 1 insertion(+)
> > > 
> > > diff --git a/tests/generic/531 b/tests/generic/531
> > > index 5e84ca97..e5f3dddd 100755
> > > --- a/tests/generic/531
> > > +++ b/tests/generic/531
> > > @@ -20,6 +20,7 @@ testfile=$TEST_DIR/$seq.txt
> > >  # real QA test starts here
> > >  _supported_fs generic
> > >  _require_scratch
> > > +_require_xfs_io_command "-T"
> > 
> > Make sense,
> > 
> > Reviewed-by: Zorro Lang <zlang@redhat.com>
> 
> Oh, generic/530 is similar with 531, why only 531 need this one?

AFS doesn't support shutdown, presumably.

(But yes, both tests should be _require-ing this.)

--D

> > 
> > >  _require_test_program "t_open_tmpfiles"
> > >  
> > >  _scratch_mkfs >> $seqres.full 2>&1
> > > 
>
Zorro Lang April 26, 2023, 3:32 p.m. UTC | #4
On Wed, Apr 26, 2023 at 07:54:50AM -0700, Darrick J. Wong wrote:
> On Wed, Apr 26, 2023 at 10:51:49PM +0800, Zorro Lang wrote:
> > On Wed, Apr 26, 2023 at 10:49:31PM +0800, Zorro Lang wrote:
> > > On Mon, Apr 24, 2023 at 03:10:41PM +0100, David Howells wrote:
> > > > Make generic/531 check that the filesystem under test supports O_TMPFILE
> > > > before attempting to test it.
> > > > 
> > > > Signed-off-by: David Howells <dhowells@redhat.com>
> > > > cc: linux-afs@lists.infradead.org
> > > > ---
> > > >  tests/generic/531 | 1 +
> > > >  1 file changed, 1 insertion(+)
> > > > 
> > > > diff --git a/tests/generic/531 b/tests/generic/531
> > > > index 5e84ca97..e5f3dddd 100755
> > > > --- a/tests/generic/531
> > > > +++ b/tests/generic/531
> > > > @@ -20,6 +20,7 @@ testfile=$TEST_DIR/$seq.txt
> > > >  # real QA test starts here
> > > >  _supported_fs generic
> > > >  _require_scratch
> > > > +_require_xfs_io_command "-T"
> > > 
> > > Make sense,
> > > 
> > > Reviewed-by: Zorro Lang <zlang@redhat.com>
> > 
> > Oh, generic/530 is similar with 531, why only 531 need this one?
> 
> AFS doesn't support shutdown, presumably.

Oh, 530 require shutdown :)

> 
> (But yes, both tests should be _require-ing this.)

Yes, I'll add that to generic/530 too, when I merge it.

> 
> --D
> 
> > > 
> > > >  _require_test_program "t_open_tmpfiles"
> > > >  
> > > >  _scratch_mkfs >> $seqres.full 2>&1
> > > > 
> > 
>
David Howells April 26, 2023, 3:57 p.m. UTC | #5
Zorro Lang <zlang@redhat.com> wrote:

> Oh, generic/530 is similar with 531, why only 531 need this one?

I didn't see it because 530 is already skipped:

	generic/530       [not run] afs does not support shutdown

David
diff mbox series

Patch

diff --git a/tests/generic/531 b/tests/generic/531
index 5e84ca97..e5f3dddd 100755
--- a/tests/generic/531
+++ b/tests/generic/531
@@ -20,6 +20,7 @@  testfile=$TEST_DIR/$seq.txt
 # real QA test starts here
 _supported_fs generic
 _require_scratch
+_require_xfs_io_command "-T"
 _require_test_program "t_open_tmpfiles"
 
 _scratch_mkfs >> $seqres.full 2>&1