Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp1640769pxb; Wed, 9 Feb 2022 00:54:14 -0800 (PST) X-Google-Smtp-Source: ABdhPJxuuuLF7Pcu+vcLaMWxADa4HZzCYTkrfVDPjwxboAuTurRSLTxDupqrQ4mRR6295Wb/dzlH X-Received: by 2002:a05:6a00:1345:: with SMTP id k5mr1232494pfu.29.1644396853814; Wed, 09 Feb 2022 00:54:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644396853; cv=none; d=google.com; s=arc-20160816; b=AWhO2F/JJVRY1KpuDayTcALQSwy+vcP7u9nI1x7ISrkqB4KqCOHIW6hKVvwjrTCYgv 6jNHV7IR278yWWTv5XX/RUVvxinXrGWQ4r4Ihitc3h7AlI/7vjtOXJ44oRCjeNZJTk7c 08FMTssFrLZot7GA3XDSG2X2JHKiB7y5NRAkZDf6weC0LjI5P6ltfABHVtO6AV2BZIf8 0cPnrOOPKARskgbNluPeADdCnDn/vXvd7/iKcshxV1EQvSkNuqTkPKnodZ2n6qUeDTHN PwxNn+bMkc0/vM4k40VpNwGIHuEqHvkXPgSaKKSfXRtbc2K5PPF+v1M9P5bgDZilrgXe bnZA== 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:from:references :cc:to:subject:dkim-signature; bh=DUOmgbDHv9TGhzCwwc6ir5fTuwgLxZHx2yr6wrlhX/c=; b=FqHxjhGddmcEAZYM2HZ1O1E9WGojFhXVzxFcR0n4dTRCi/6dgvyyTW9R99XIhFQ1YM vjdmRMkpdtgLgbLriregCyvuzmEYe8Dp8gZkHVW/spGFWXp6pxEseofjlxd3sJibksDf SED3Vri4fiCXMqMpCzGkAkH4Bcg13O/hpHIbLnxB72PrngkULaxtiUkCiQTcrb+rz99V sn+5ulIyjf0bkU208B3fe+y7XK5U36WPmNjmF3NaPDSgY0rcgTGXi0h5rddZPBWPJ/XE eVVqNFMCEEdnFtFKaPK3SBIZGIJ/2r5JZnB96NsveiZ+uFqE3exo+dPtlLkWzxN7P/qD pshA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=google header.b=eex8i7ku; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id x16si15912859pfh.311.2022.02.09.00.54.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Feb 2022 00:54:13 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=google header.b=eex8i7ku; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 750F8E00D0D8; Wed, 9 Feb 2022 00:45:52 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1352560AbiBHRLL (ORCPT + 99 others); Tue, 8 Feb 2022 12:11:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45260 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244646AbiBHRLJ (ORCPT ); Tue, 8 Feb 2022 12:11:09 -0500 Received: from mail-io1-xd2a.google.com (mail-io1-xd2a.google.com [IPv6:2607:f8b0:4864:20::d2a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D73A3C061576 for ; Tue, 8 Feb 2022 09:11:05 -0800 (PST) Received: by mail-io1-xd2a.google.com with SMTP id n17so22002825iod.4 for ; Tue, 08 Feb 2022 09:11:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=DUOmgbDHv9TGhzCwwc6ir5fTuwgLxZHx2yr6wrlhX/c=; b=eex8i7kur3v78Vl/7duuld6Gedj+S9MbQzPL4dqaRAmkcvf6y19qbfCr7f0mpjVnYe 7NbM8tZue9DfEpwG7KleDx6axk4urVIRu6QhVzMymZ9l3AoEsJDxpe1mTPCJRrBPLTRv GR5X4ED9HqF2qffqJd17N70du82rofyEAm0dk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=DUOmgbDHv9TGhzCwwc6ir5fTuwgLxZHx2yr6wrlhX/c=; b=ZNfOLuN1H6hTp1s/h5OEEk1gni7KBlknIofXZ+vBEM38l5PZERK+MOd9ucXc71F5VX 5pFs6RWUijweJ5cGB+L2jVgO1wAt77uc5+Tlu2NBKKrCGbDdw7q3DoxAZnTn6Ah+owFe mXl/l3WHGTz0KeeMJrxQzzdQ6qRkLrVVLSaxv1eHDUyV8Y148ABchAEe3YOd+ogB/9cw 4NQA780SjzCtMoRycGGdebKhBsAp+9PID9/nYXkIxJ1wrIXjDaozl6vMdsxQKLPus+RE psVhba+6xZrLGIh0UyWU7rNOnj3pyY2AqSNcXhf4kdpFB97nFj25FYnFwVAXQ31hWeYH UZvQ== X-Gm-Message-State: AOAM533c9TuP1Uvv7p8jppnCPG4z3HNyxQi31815b/itbLJyyccvxXND Q+mqa+ztsvXtRXZ0Rl6P1eWU6A== X-Received: by 2002:a05:6602:2ac1:: with SMTP id m1mr2448582iov.123.1644340265093; Tue, 08 Feb 2022 09:11:05 -0800 (PST) Received: from [192.168.1.128] ([71.205.29.0]) by smtp.gmail.com with ESMTPSA id g7sm7620275ild.23.2022.02.08.09.11.04 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 08 Feb 2022 09:11:04 -0800 (PST) Subject: Re: [PATCH v3 1/1] Documentation: dev-tools: clarify KTAP specification wording To: frowand.list@gmail.com, Jonathan Corbet , David Gow , 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, Shuah Khan References: <20220208164623.3151777-1-frowand.list@gmail.com> From: Shuah Khan Message-ID: <86c4c8ce-468d-8922-3ada-7960f1924ba8@linuxfoundation.org> Date: Tue, 8 Feb 2022 10:11:03 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: <20220208164623.3151777-1-frowand.list@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,RDNS_NONE,SPF_HELO_NONE, T_SCC_BODY_TEXT_LINE autolearn=no 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/8/22 9:46 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 > > Reviewed-by: Tim Bird > Reviewed-by: David Gow > Signed-off-by: Frank Rowand > --- > > 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 > > 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..dfb3f10a8b2d 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" > If we can put the data in a table - makes it lot easier to read > The TAP14 specification does permit nested tests, but instead of using another > nested version line, uses a line of the form > Looks good otherwise. Thanks for clearly outlining the differences. Reviewed-by: Shuah Khan thanks, -- Shuah