Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp915742pxb; Tue, 8 Feb 2022 05:30:55 -0800 (PST) X-Google-Smtp-Source: ABdhPJyiMhytrzvqZUoQBcKdash2OTJguKE7Yyf5MYav3wZVyJRpCwsRDFgsJuhG/sn+wLsKs0wq X-Received: by 2002:a62:6d01:: with SMTP id i1mr2721335pfc.45.1644327054928; Tue, 08 Feb 2022 05:30:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644327054; cv=none; d=google.com; s=arc-20160816; b=GOP/QHMRC6zfkEyQIw4TzwH6wi3RGmkXOtUB8VTx/2plTPqilS9n/ZTHbdV9W4mHZ+ XQJwqPIFKpH5eQmvvdOvzv9Z2Z6Q4XiJsUb0La5aCqKHRRCXJHXUvzI1BpE7+j6d7FaO wzVzkgTofdQPfMQmztIUZd7eYkivx5Xp7tYqqSAC3x/FgdC57x9P0tV8KOsddQk5n4v5 EgznhLFKLA2UaQ0a33MEu555V4/8PBHh9lnbjam2VDSOzxLtC/9F7migl3foo77Gd9Fx WUGAmCLMuQKoqR45wL/4zJLXevLgsok+KpM5KwzFuWLzemeiUC/F43RJmb5VEUo2jjS/ i2Tw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:references:cc :to:from:subject:dkim-signature; bh=omVF455pvemsLVj7xnWoQW2sUd/KNgnEiQ/s7RiZc/8=; b=DX0dn+FWQr/A9eHiqy5LZEVOI8dUZxv1tk+eI2YggAzjEJUlzEenrqD3yWkEPvJiQG JK0Poqv7VWXTVuQEQA3GY2E6wNeQPTsXolhtqCdz9kivPAxkFvSc2v9v+7oe3vOi29QW ad+Mk60Sjbd/O/y526hYJnEFOJTMXuLsA7r1Z688MWe1FiThD7YhIe0A45Do9X/dEDCK ZwyoUHGrOLFylRnuqLdbWJ5fTXmUTmr+3CnMQgWbyALq2lWdzjjXo2MluFwlCMdhIIkx 97oBWwctQpfSWAqaNY7bBFF9y80ZfUQg2LLqK7jH545ufIul40Ieia/ncxsjECl/d+T8 urnA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=k4ayfMnB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m9si8593122plg.619.2022.02.08.05.30.37; Tue, 08 Feb 2022 05:30:54 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=k4ayfMnB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343812AbiBGQn0 (ORCPT + 99 others); Mon, 7 Feb 2022 11:43:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43892 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1356846AbiBGQi4 (ORCPT ); Mon, 7 Feb 2022 11:38:56 -0500 Received: from mail-qt1-x82b.google.com (mail-qt1-x82b.google.com [IPv6:2607:f8b0:4864:20::82b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6450EC0401D3; Mon, 7 Feb 2022 08:38:55 -0800 (PST) Received: by mail-qt1-x82b.google.com with SMTP id k25so12371527qtp.4; Mon, 07 Feb 2022 08:38:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=subject:from:to:cc:references:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=omVF455pvemsLVj7xnWoQW2sUd/KNgnEiQ/s7RiZc/8=; b=k4ayfMnBUu4S6TrIigANz8YZeT5vNoAtZLetXYMk3RebEfveH9HpwQcw0k/rgqjlrH Q59gx6DXbE8RrT3JvuEHw/CNPeWwO/4M+SfHaWP7UUGP2ew/SrAQ2+NhzZDr6T16tvhT sQ2VPhM1sjB3PcgAp+MV5ow2SXxIw0i1Gzz/ceQiSWxUFY7q6cKdIn1P4YxdxqyHLKCT uNiiDeA3rF6sGDEVj5fIMN29ommgeQJP+GObCCdU/AAfeSt06jCHf8ZpOfmE9naHPi3T /pcrAIuoQ9aRkofY5fXPYNnzvZFqKooSyxzBu1DB3jEF36Jm75Uy4ArE9oleZbKkt4oK z11A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:from:to:cc:references:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=omVF455pvemsLVj7xnWoQW2sUd/KNgnEiQ/s7RiZc/8=; b=FCykHHuhYO/ZfYw1u4GfSeVO2SL+nt49g2p2UGgpGMz+m7u2fXRoEti5XCR8L+MsPv CDsPEqo/jv7BHqRfflYQ1IS2FbfM+dVJiPdXaBfQ6MZYO5Kt4v2ji4Mcj3oLlb9shglD ojEcSpxFhYzYBYUJGDOJfhHoqkvu7ZDYzK5uEl0IjR+QILGk8x1FsLVWBZrHUG15lr2a 2RCK8CQNq1ERZrwnY6Oy5kLmmQ0tMTUpS/uPHQTebNKkJeNZvew/ucnxZtcbSbB6vHNH rMFdBjMS6OsRjYmibgUTyEFYkfDaIx3qmHvbiVM4sKzRjOGM2xWFL0ida3jjqF9qA3wC GIZw== X-Gm-Message-State: AOAM5319b+iOtBBXgP2jHTcRyriM+gHznAJ+6hlhPQG20Yy5kKp20QYn Z3F4/FYpKFapWWgWSCIPpk4Ywq09/fc= X-Received: by 2002:a05:622a:14d4:: with SMTP id u20mr254950qtx.262.1644251934550; Mon, 07 Feb 2022 08:38:54 -0800 (PST) Received: from [192.168.1.49] (c-67-187-90-124.hsd1.tn.comcast.net. [67.187.90.124]) by smtp.gmail.com with ESMTPSA id z22sm5509676qko.2.2022.02.07.08.38.53 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 07 Feb 2022 08:38:54 -0800 (PST) Subject: Re: [PATCH v2 1/1] Documentation: dev-tools: clarify KTAP specification wording From: Frank Rowand To: Jonathan Corbet , David Gow , Shuah Khan , Kees Cook , Rae Moar , Tim.Bird@sony.com, Brendan Higgins Cc: rmr167@gmail.com, guillaume.tucker@collabora.com, dlatypov@google.com, kernelci@groups.io, kunit-dev@googlegroups.com, linux-kselftest@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org References: <20220207162813.3091899-1-frowand.list@gmail.com> Message-ID: Date: Mon, 7 Feb 2022 10:38:52 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 In-Reply-To: <20220207162813.3091899-1-frowand.list@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2/7/22 10:28 AM, frowand.list@gmail.com wrote: > From: Frank Rowand > > 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 > > Signed-off-by: Frank Rowand > --- Please do not apply this version (v2). I was working off the KTAP specification from a different github repo than I should have been referencing. v3 upcoming. -Frank > > 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 > > Documentation/dev-tools/ktap.rst | 24 ++++++++++++++++++------ > 1 file changed, 18 insertions(+), 6 deletions(-) > > diff --git a/Documentation/dev-tools/ktap.rst b/Documentation/dev-tools/ktap.rst > index 878530cb9c27..9c40c94d3f12 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:: > @@ -225,9 +235,11 @@ 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 > +- yaml and json are not recommended in KTAP diagnostic messages > +- TODO directive not recognized in KTAP > - KTAP allows for an arbitrary number of tests to be nested > +- TAP includes "Unknown lines" in the category of "Anything else" > +- TAP says "Unknown lines" are "incorrect; KTAP allows "Unknown lines" > > The TAP14 specification does permit nested tests, but instead of using another > nested version line, uses a line of the form >