Skip to contentSkip to conversation

Documentation: dev-tools: Clarify requirements for result description

PATCH RESEND In review Mark Brown 2 participants 2 messages Dec 7, 2022

Subsystems (3)
lore
Share & tools
lore

Mark Brown

author
#0 lore raw

PATCH RESEND 1/1 Documentation: dev-tools: Clarify requirements for result description

Currently the KTAP specification says that a test result line is

<result> <number> [<description>][ # [<directive>] [<diagnostic data>]]

and the description of a test can be "any sequence of words (can't include #)" which specifies that there may be more than one word but does not specify anything other than those words which might be used to separate the words which probably isn't what we want. Given that practically we have tests using a range of separators for words including combinations of spaces and combinations of other symbols like underscores or punctuation let's just clarify that the description can contain any character other than # (marking the start of the directive/diagnostic) or newline (marking the end of this test result).

---
 Documentation/dev-tools/ktap.rst | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Documentation/dev-tools/ktap.rst +2 -2
index d0a9565b0f44..414c105b10a9 100644
@@ -80,8 +80,8 @@ have the number 1 and the number then must increase by 1 for each additional
 subtest within the same test at the same nesting level.
 
 The description is a description of the test, generally the name of
-the test, and can be any string of words (can't include #). The
-description is optional, but recommended.
+the test, and can be any string of characters other than # or a
+newline.  The description is optional, but recommended.
 
 The directive and any diagnostic data is optional. If either are present, they
 must follow a hash sign, "#".
Signature · 1 line
2.30.2
#1 lore raw
Quoted 16 lines · Mark Brown

Currently the KTAP specification says that a test result line is

<result> <number> [<description>][ # [<directive>] [<diagnostic data>]]

and the description of a test can be "any sequence of words (can't include #)" which specifies that there may be more than one word but does not specify anything other than those words which might be used to separate the words which probably isn't what we want. Given that practically we have tests using a range of separators for words including combinations of spaces and combinations of other symbols like underscores or punctuation let's just clarify that the description can contain any character other than # (marking the start of the directive/diagnostic) or newline (marking the end of this test result).

Quoted 4 lines

---

+CC Rae Moar

I've added this to the list of patches we want to take for the kselftest/kunit branch. If someone else wants to take it (kselftest, Documentation), let me know and I'll remove it from the list.

Cheers,
-- David

Quoted 21 lines
 Documentation/dev-tools/ktap.rst | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Documentation/dev-tools/ktap.rst +2 -3
index d0a9565b0f44..414c105b10a9 100644
@@ -80,8 +80,8 @@ have the number 1 and the number then must increase by 1 for each additional
 subtest within the same test at the same nesting level.
 
 The description is a description of the test, generally the name of
-the test, and can be any string of words (can't include #). The
-description is optional, but recommended.
+the test, and can be any string of characters other than # or a
+newline.  The description is optional, but recommended.
 
 The directive and any diagnostic data is optional. If either are present, they
 must follow a hash sign, "#".
--

2.30.2