linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v5 1/1] Documentation: dev-tools: clarify KTAP specification wording
@ 2022-02-10 23:36 frowand.list
  2022-02-10 23:39 ` Frank Rowand
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: frowand.list @ 2022-02-10 23:36 UTC (permalink / raw)
  To: Jonathan Corbet, David Gow, Shuah Khan, Kees Cook, Rae Moar,
	Tim.Bird, Brendan Higgins
  Cc: rmr167, guillaume.tucker, dlatypov, kernelci, kunit-dev,
	linux-kselftest, linux-doc, linux-kernel

From: Frank Rowand <frank.rowand@sony.com>

Add the spec version to the title line.

Explain likely source of "Unknown lines".

"Unknown lines" in nested tests are optionally indented.

Add "Unknown lines" items to differences between TAP & KTAP list

Convert "Major differences between TAP and KTAP" from a bullet list
to a table.  The bullet list was being formatted as a single
paragraph.

Reviewed-by: Tim Bird <Tim.Bird@sony.com>
Reviewed-by: David Gow <davidgow@google.com>
Reviewed-by: Shuah Khan <skhan@linuxfoundation.org>
Signed-off-by: Frank Rowand <frank.rowand@sony.com>
---

I'm not sure if I should include a review tag of patch 2/2 version 4:
  Reviewed-by: Kees Cook <keescook@chromium.org>

Changes since version 4
  - Remove patch 2/2 (fixes to code-block directives)
  - Remove patch 2/2 (conversion to table folded into this patch)

Changes since version 3
  - Add reviewed by Shuah

Changes since version 2
  - Add missing quote after word: incorrect
  - Add Reviewed-by tags

Changes since version 1
  - Explain likely source of "Unknown lines"
  - "Unknown line" in nested tests are optionally indented
  - Add "Unknown lines" items to differences between TAP & KTAP list

Fixes to code-block directives in version 3 were also submitted by
Randy Dunlap in:
https://lore.kernel.org/lkml/20220131003637.14274-1-rdunlap@infradead.org/T/

 Documentation/dev-tools/ktap.rst | 31 +++++++++++++++++++++++--------
 1 file changed, 23 insertions(+), 8 deletions(-)

diff --git a/Documentation/dev-tools/ktap.rst b/Documentation/dev-tools/ktap.rst
index 878530cb9c27..d7fe05de40b4 100644
--- a/Documentation/dev-tools/ktap.rst
+++ b/Documentation/dev-tools/ktap.rst
@@ -1,8 +1,8 @@
 .. SPDX-License-Identifier: GPL-2.0
 
-========================================
-The Kernel Test Anything Protocol (KTAP)
-========================================
+===================================================
+The Kernel Test Anything Protocol (KTAP), version 1
+===================================================
 
 TAP, or the Test Anything Protocol is a format for specifying test results used
 by a number of projects. It's website and specification are found at this `link
@@ -174,6 +174,13 @@ There may be lines within KTAP output that do not follow the format of one of
 the four formats for lines described above. This is allowed, however, they will
 not influence the status of the tests.
 
+This is an important difference from TAP.  Kernel tests may print messages
+to the system console or a log file.  Both of these destinations may contain
+messages either from unrelated kernel or userspace activity, or kernel
+messages from non-test code that is invoked by the test.  The kernel code
+invoked by the test likely is not aware that a test is in progress and
+thus can not print the message as a diagnostic message.
+
 Nested tests
 ------------
 
@@ -186,10 +193,13 @@ starting with another KTAP version line and test plan, and end with the overall
 result. If one of the subtests fail, for example, the parent test should also
 fail.
 
-Additionally, all result lines in a subtest should be indented. One level of
+Additionally, all lines in a subtest should be indented. One level of
 indentation is two spaces: "  ". The indentation should begin at the version
 line and should end before the parent test's result line.
 
+"Unknown lines" are not considered to be lines in a subtest and thus are
+allowed to be either indented or not indented.
+
 An example of a test with two nested subtests:
 
 .. code-block::
@@ -224,10 +234,15 @@ An example format with multiple levels of nested testing:
 Major differences between TAP and KTAP
 --------------------------------------
 
-Note the major differences between the TAP and KTAP specification:
-- yaml and json are not recommended in diagnostic messages
-- TODO directive not recognized
-- KTAP allows for an arbitrary number of tests to be nested
+==================================================   =========  ===============
+Feature                                              TAP        KTAP
+==================================================   =========  ===============
+yaml and json in diagnosic message                   ok         not recommended
+TODO directive                                       ok         not recognized
+allows an arbitrary number of tests to be nested     no         yes
+"Unknown lines" are in category of "Anything else"   yes        no
+"Unknown lines" are                                  incorrect  allowed
+==================================================   =========  ===============
 
 The TAP14 specification does permit nested tests, but instead of using another
 nested version line, uses a line of the form
-- 
Frank Rowand <frank.rowand@sony.com>


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v5 1/1] Documentation: dev-tools: clarify KTAP specification wording
  2022-02-10 23:36 [PATCH v5 1/1] Documentation: dev-tools: clarify KTAP specification wording frowand.list
@ 2022-02-10 23:39 ` Frank Rowand
  2022-02-14 21:56 ` Brendan Higgins
  2022-02-15 23:14 ` Jonathan Corbet
  2 siblings, 0 replies; 4+ messages in thread
From: Frank Rowand @ 2022-02-10 23:39 UTC (permalink / raw)
  To: Jonathan Corbet, David Gow, Shuah Khan, Kees Cook, Rae Moar,
	Tim.Bird, Brendan Higgins
  Cc: rmr167, guillaume.tucker, dlatypov, kernelci, kunit-dev,
	linux-kselftest, linux-doc, linux-kernel

On 2/10/22 5:36 PM, frowand.list@gmail.com wrote:
> From: Frank Rowand <frank.rowand@sony.com>

< snip >

> Fixes to code-block directives in version 3 were also submitted by
                                    ^^^^^^^^^  version 4

> Randy Dunlap in:
> https://lore.kernel.org/lkml/20220131003637.14274-1-rdunlap@infradead.org/T/

< snip >

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v5 1/1] Documentation: dev-tools: clarify KTAP specification wording
  2022-02-10 23:36 [PATCH v5 1/1] Documentation: dev-tools: clarify KTAP specification wording frowand.list
  2022-02-10 23:39 ` Frank Rowand
@ 2022-02-14 21:56 ` Brendan Higgins
  2022-02-15 23:14 ` Jonathan Corbet
  2 siblings, 0 replies; 4+ messages in thread
From: Brendan Higgins @ 2022-02-14 21:56 UTC (permalink / raw)
  To: frowand.list
  Cc: Jonathan Corbet, David Gow, Shuah Khan, Kees Cook, Rae Moar,
	Tim.Bird, rmr167, guillaume.tucker, dlatypov, kernelci,
	kunit-dev, linux-kselftest, linux-doc, linux-kernel

On Thu, Feb 10, 2022 at 6:36 PM <frowand.list@gmail.com> wrote:
>
> From: Frank Rowand <frank.rowand@sony.com>
>
> Add the spec version to the title line.
>
> Explain likely source of "Unknown lines".
>
> "Unknown lines" in nested tests are optionally indented.
>
> Add "Unknown lines" items to differences between TAP & KTAP list
>
> Convert "Major differences between TAP and KTAP" from a bullet list
> to a table.  The bullet list was being formatted as a single
> paragraph.
>
> Reviewed-by: Tim Bird <Tim.Bird@sony.com>
> Reviewed-by: David Gow <davidgow@google.com>
> Reviewed-by: Shuah Khan <skhan@linuxfoundation.org>
> Signed-off-by: Frank Rowand <frank.rowand@sony.com>

Reviewed-by: Brendan Higgins <brendanhiggins@google.com>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v5 1/1] Documentation: dev-tools: clarify KTAP specification wording
  2022-02-10 23:36 [PATCH v5 1/1] Documentation: dev-tools: clarify KTAP specification wording frowand.list
  2022-02-10 23:39 ` Frank Rowand
  2022-02-14 21:56 ` Brendan Higgins
@ 2022-02-15 23:14 ` Jonathan Corbet
  2 siblings, 0 replies; 4+ messages in thread
From: Jonathan Corbet @ 2022-02-15 23:14 UTC (permalink / raw)
  To: frowand.list, David Gow, Shuah Khan, Kees Cook, Rae Moar,
	Tim.Bird, Brendan Higgins
  Cc: rmr167, guillaume.tucker, dlatypov, kernelci, kunit-dev,
	linux-kselftest, linux-doc, linux-kernel

frowand.list@gmail.com writes:

> From: Frank Rowand <frank.rowand@sony.com>
>
> Add the spec version to the title line.
>
> Explain likely source of "Unknown lines".
>
> "Unknown lines" in nested tests are optionally indented.
>
> Add "Unknown lines" items to differences between TAP & KTAP list
>
> Convert "Major differences between TAP and KTAP" from a bullet list
> to a table.  The bullet list was being formatted as a single
> paragraph.
>
> Reviewed-by: Tim Bird <Tim.Bird@sony.com>
> Reviewed-by: David Gow <davidgow@google.com>
> Reviewed-by: Shuah Khan <skhan@linuxfoundation.org>
> Signed-off-by: Frank Rowand <frank.rowand@sony.com>

I've applied this, thanks.

jon

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-02-15 23:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-10 23:36 [PATCH v5 1/1] Documentation: dev-tools: clarify KTAP specification wording frowand.list
2022-02-10 23:39 ` Frank Rowand
2022-02-14 21:56 ` Brendan Higgins
2022-02-15 23:14 ` Jonathan Corbet

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).