diff mbox series

[13/13] misc: update documentation to reflect auto-generated group files

Message ID 162317283324.653489.9381968524443830077.stgit@locust (mailing list archive)
State New, archived
Headers show
Series fstests: move test group lists into test files | expand

Commit Message

Darrick J. Wong June 8, 2021, 5:20 p.m. UTC
From: Darrick J. Wong <djwong@kernel.org>

Update the documentation to outline the new requirements for test files
so that we can generate group files during build.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
---
 README |   19 ++++++++++++++++---
 1 file changed, 16 insertions(+), 3 deletions(-)

Comments

Chandan Babu R June 11, 2021, 8:23 a.m. UTC | #1
On 08 Jun 2021 at 22:50, Darrick J. Wong wrote:
> From: Darrick J. Wong <djwong@kernel.org>
>
> Update the documentation to outline the new requirements for test files
> so that we can generate group files during build.
>

Looks good.

Reviewed-by: Chandan Babu R <chandanrlinux@gmail.com>

> Signed-off-by: Darrick J. Wong <djwong@kernel.org>
> ---
>  README |   19 ++++++++++++++++---
>  1 file changed, 16 insertions(+), 3 deletions(-)
>
>
> diff --git a/README b/README
> index 048491a6..ab298ca9 100644
> --- a/README
> +++ b/README
> @@ -140,7 +140,8 @@ Running tests:
>      - ./check '*/001' '*/002' '*/003'
>      - ./check '*/06?'
>      - Groups of tests maybe ran by: ./check -g [group(s)]
> -      See the 'group' file for details on groups
> +      See the tests/*/group.list files after building xfstests to learn about
> +      each test's group memberships.
>      - If you want to run all tests regardless of what group they are in
>        (including dangerous tests), use the "all" group: ./check -g all
>      - To randomize test order: ./check -r [test(s)]
> @@ -174,8 +175,8 @@ Test script environment:
>  
>      When developing a new test script keep the following things in
>      mind.  All of the environment variables and shell procedures are
> -    available to the script once the "common/rc" file has been
> -    sourced.
> +    available to the script once the "common/preamble" file has been
> +    sourced and the "_begin_fstest" function has been called.
>  
>       1. The tests are run from an arbitrary directory.  If you want to
>  	do operations on an XFS filesystem (good idea, eh?), then do
> @@ -249,6 +250,18 @@ Test script environment:
>  	  in the ./new script. It can contain only alphanumeric characters
>  	  and dash. Note the "NNN-" part is added automatically.
>  
> +     6. Test group membership: Each test can be associated with any number
> +	of groups for convenient selection of subsets of tests.  Test names
> +	can be any sequence of non-whitespace characters.  Test authors
> +	associate a test with groups by passing the names of those groups as
> +	arguments to the _begin_fstest function:
> +
> +	_begin_fstest auto quick subvol snapshot
> +
> +	The build process scans test files for _begin_fstest invocations and
> +	compiles the group list from that information.  In other words, test
> +	files must call _begin_fstest or they will not be run.
> +
>  Verified output:
>  
>      Each test script has a name, e.g. 007, and an associated
Allison Henderson June 14, 2021, 7:39 p.m. UTC | #2
On 6/8/21 10:20 AM, Darrick J. Wong wrote:
> From: Darrick J. Wong <djwong@kernel.org>
> 
> Update the documentation to outline the new requirements for test files
> so that we can generate group files during build.
> 
> Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Ok, that sounds about right
Reviewed-by: Allison Henderson <allison.henderson@oracle.com>

> ---
>   README |   19 ++++++++++++++++---
>   1 file changed, 16 insertions(+), 3 deletions(-)
> 
> 
> diff --git a/README b/README
> index 048491a6..ab298ca9 100644
> --- a/README
> +++ b/README
> @@ -140,7 +140,8 @@ Running tests:
>       - ./check '*/001' '*/002' '*/003'
>       - ./check '*/06?'
>       - Groups of tests maybe ran by: ./check -g [group(s)]
> -      See the 'group' file for details on groups
> +      See the tests/*/group.list files after building xfstests to learn about
> +      each test's group memberships.
>       - If you want to run all tests regardless of what group they are in
>         (including dangerous tests), use the "all" group: ./check -g all
>       - To randomize test order: ./check -r [test(s)]
> @@ -174,8 +175,8 @@ Test script environment:
>   
>       When developing a new test script keep the following things in
>       mind.  All of the environment variables and shell procedures are
> -    available to the script once the "common/rc" file has been
> -    sourced.
> +    available to the script once the "common/preamble" file has been
> +    sourced and the "_begin_fstest" function has been called.
>   
>        1. The tests are run from an arbitrary directory.  If you want to
>   	do operations on an XFS filesystem (good idea, eh?), then do
> @@ -249,6 +250,18 @@ Test script environment:
>   	  in the ./new script. It can contain only alphanumeric characters
>   	  and dash. Note the "NNN-" part is added automatically.
>   
> +     6. Test group membership: Each test can be associated with any number
> +	of groups for convenient selection of subsets of tests.  Test names
> +	can be any sequence of non-whitespace characters.  Test authors
> +	associate a test with groups by passing the names of those groups as
> +	arguments to the _begin_fstest function:
> +
> +	_begin_fstest auto quick subvol snapshot
> +
> +	The build process scans test files for _begin_fstest invocations and
> +	compiles the group list from that information.  In other words, test
> +	files must call _begin_fstest or they will not be run.
> +
>   Verified output:
>   
>       Each test script has a name, e.g. 007, and an associated
>
Darrick J. Wong June 14, 2021, 8:49 p.m. UTC | #3
On Mon, Jun 14, 2021 at 12:39:46PM -0700, Allison Henderson wrote:
> 
> 
> On 6/8/21 10:20 AM, Darrick J. Wong wrote:
> > From: Darrick J. Wong <djwong@kernel.org>
> > 
> > Update the documentation to outline the new requirements for test files
> > so that we can generate group files during build.
> > 
> > Signed-off-by: Darrick J. Wong <djwong@kernel.org>
> Ok, that sounds about right
> Reviewed-by: Allison Henderson <allison.henderson@oracle.com>

Thanks to you and Eric and Chandan for reviewing this!

--D

> 
> > ---
> >   README |   19 ++++++++++++++++---
> >   1 file changed, 16 insertions(+), 3 deletions(-)
> > 
> > 
> > diff --git a/README b/README
> > index 048491a6..ab298ca9 100644
> > --- a/README
> > +++ b/README
> > @@ -140,7 +140,8 @@ Running tests:
> >       - ./check '*/001' '*/002' '*/003'
> >       - ./check '*/06?'
> >       - Groups of tests maybe ran by: ./check -g [group(s)]
> > -      See the 'group' file for details on groups
> > +      See the tests/*/group.list files after building xfstests to learn about
> > +      each test's group memberships.
> >       - If you want to run all tests regardless of what group they are in
> >         (including dangerous tests), use the "all" group: ./check -g all
> >       - To randomize test order: ./check -r [test(s)]
> > @@ -174,8 +175,8 @@ Test script environment:
> >       When developing a new test script keep the following things in
> >       mind.  All of the environment variables and shell procedures are
> > -    available to the script once the "common/rc" file has been
> > -    sourced.
> > +    available to the script once the "common/preamble" file has been
> > +    sourced and the "_begin_fstest" function has been called.
> >        1. The tests are run from an arbitrary directory.  If you want to
> >   	do operations on an XFS filesystem (good idea, eh?), then do
> > @@ -249,6 +250,18 @@ Test script environment:
> >   	  in the ./new script. It can contain only alphanumeric characters
> >   	  and dash. Note the "NNN-" part is added automatically.
> > +     6. Test group membership: Each test can be associated with any number
> > +	of groups for convenient selection of subsets of tests.  Test names
> > +	can be any sequence of non-whitespace characters.  Test authors
> > +	associate a test with groups by passing the names of those groups as
> > +	arguments to the _begin_fstest function:
> > +
> > +	_begin_fstest auto quick subvol snapshot
> > +
> > +	The build process scans test files for _begin_fstest invocations and
> > +	compiles the group list from that information.  In other words, test
> > +	files must call _begin_fstest or they will not be run.
> > +
> >   Verified output:
> >       Each test script has a name, e.g. 007, and an associated
> >
diff mbox series

Patch

diff --git a/README b/README
index 048491a6..ab298ca9 100644
--- a/README
+++ b/README
@@ -140,7 +140,8 @@  Running tests:
     - ./check '*/001' '*/002' '*/003'
     - ./check '*/06?'
     - Groups of tests maybe ran by: ./check -g [group(s)]
-      See the 'group' file for details on groups
+      See the tests/*/group.list files after building xfstests to learn about
+      each test's group memberships.
     - If you want to run all tests regardless of what group they are in
       (including dangerous tests), use the "all" group: ./check -g all
     - To randomize test order: ./check -r [test(s)]
@@ -174,8 +175,8 @@  Test script environment:
 
     When developing a new test script keep the following things in
     mind.  All of the environment variables and shell procedures are
-    available to the script once the "common/rc" file has been
-    sourced.
+    available to the script once the "common/preamble" file has been
+    sourced and the "_begin_fstest" function has been called.
 
      1. The tests are run from an arbitrary directory.  If you want to
 	do operations on an XFS filesystem (good idea, eh?), then do
@@ -249,6 +250,18 @@  Test script environment:
 	  in the ./new script. It can contain only alphanumeric characters
 	  and dash. Note the "NNN-" part is added automatically.
 
+     6. Test group membership: Each test can be associated with any number
+	of groups for convenient selection of subsets of tests.  Test names
+	can be any sequence of non-whitespace characters.  Test authors
+	associate a test with groups by passing the names of those groups as
+	arguments to the _begin_fstest function:
+
+	_begin_fstest auto quick subvol snapshot
+
+	The build process scans test files for _begin_fstest invocations and
+	compiles the group list from that information.  In other words, test
+	files must call _begin_fstest or they will not be run.
+
 Verified output:
 
     Each test script has a name, e.g. 007, and an associated