All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: fstests@vger.kernel.org
Subject: [PATCH 05/12] README: document _begin_fstests better
Date: Tue, 17 May 2022 17:01:04 +1000	[thread overview]
Message-ID: <20220517070111.1381936-6-david@fromorbit.com> (raw)
In-Reply-To: <20220517070111.1381936-1-david@fromorbit.com>

From: Dave Chinner <dchinner@redhat.com>

Because how it actually gets used by the fstests infrastructure
has been undocumented and that has impact on how it should be set
up.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
---
 README | 41 ++++++++++++++++++++++++++++++++---------
 1 file changed, 32 insertions(+), 9 deletions(-)

diff --git a/README b/README
index 7da66cb6..eacf1acd 100644
--- a/README
+++ b/README
@@ -368,19 +368,42 @@ Test script environment:
 
      6. Test group membership: Each test can be associated with any number
 	of groups for convenient selection of subsets of tests.  Group 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.  For example, the code:
+	can be any sequence of non-whitespace characters, though human-readable
+	names that match the set [A-Za-z0-9\-] are highly prefered.
 
-	_begin_fstest auto quick subvol snapshot
+	Test authors associate a test with groups by passing the names of those
+	groups as arguments to the _begin_fstest function. While _begin_fstests
+	is a shell function that must be called at the start of a test to
+	initialise the test environment correctly, the the build infrastructure
+	also scans the test files for _begin_fstests invocations. It does this
+	to compile the group lists that are used to determine which tests to run
+	when `check` is executed. In other words, test files files must call
+	_begin_fstest with their intended groups or they will not be run.
+
+	However, because the build infrastructure also uses _begin_fstests as
+	a defined keyword, addition restrictions are placed on how it must be
+	formatted:
+
+	(a) It must be a single line with no multi-line continuations.
+
+	(b) group names should be separated by spaces and not other whitespace
+
+	(c) A '#' placed anywhere in the list, even in the middle of a group
+	    name, will cause everything from the # to the end of the line to be
+	    ignored.
+
+	For example, the code:
+
+	_begin_fstest auto quick subvol snapshot # metadata
 
 	associates the current test with the "auto", "quick", "subvol", and
-	"snapshot" groups.  It is not necessary to specify the "all" group
-	in the list because that group is computed at run time.
+	"snapshot" groups. Because "metadata" is after the "#" comment
+	delimiter, it is ignored by the build infrastructure and so it will not
+	be associated with that group.
+
+	It is not necessary to specify the "all" group in the list because that
+	group is always computed at run time from the group lists.
 
-	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:
 
-- 
2.35.1


  parent reply	other threads:[~2022-05-17  7:01 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-17  7:00 [PATCH 00/13 V2] fstests: fixes and more fixes Dave Chinner
2022-05-17  7:01 ` [PATCH 01/12] fstests: filter quota warnings Dave Chinner
2022-05-17  7:01 ` [PATCH 02/12] xfs/122: add attribute log formats to test output Dave Chinner
2022-05-17  7:01 ` [PATCH 03/12] xfs/348: golden output is not correct Dave Chinner
2022-05-17  7:01 ` [PATCH 04/12] fstests: fix group list generation for whacky test names Dave Chinner
2022-05-19 18:52   ` Darrick J. Wong
2022-05-20  8:36   ` Zorro Lang
2022-05-20  8:54     ` Zorro Lang
2022-05-20  9:25       ` Zorro Lang
2022-05-20 16:23         ` Darrick J. Wong
2022-05-21  0:27           ` Zorro Lang
2022-05-17  7:01 ` Dave Chinner [this message]
2022-05-19 23:13   ` [PATCH 05/12] README: document _begin_fstests better Darrick J. Wong
2022-05-20  1:58     ` Dave Chinner
2022-05-20  2:02       ` Darrick J. Wong
2022-05-20  5:23         ` Zorro Lang
2022-05-20  5:42           ` Dave Chinner
2022-05-20  6:16             ` Zorro Lang
2022-05-17  7:01 ` [PATCH 06/12] xfs/148: make test debuggable Dave Chinner
2022-05-19 18:55   ` Darrick J. Wong
2022-05-17  7:01 ` [PATCH 07/12] xfs/148: fix failure from bad shortform size assumptions Dave Chinner
2022-05-20  7:34   ` Zorro Lang
2022-05-21 23:22     ` Dave Chinner
2022-05-17  7:01 ` [PATCH 08/12] generic/081: don't run on DAX capable devices Dave Chinner
2022-05-18  5:11   ` Dave Chinner
2022-05-17  7:01 ` [PATCH 12/12] xfs/191: remove broken test Dave Chinner
2022-05-19 18:55   ` Darrick J. Wong
2022-05-17  7:49 ` [PATCH 00/13 V2] fstests: fixes and more fixes Dave Chinner
2022-05-17  8:24   ` Zorro Lang
2022-05-17 21:39     ` Dave Chinner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220517070111.1381936-6-david@fromorbit.com \
    --to=david@fromorbit.com \
    --cc=fstests@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.