Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C0BADC433F5 for ; Wed, 8 Dec 2021 16:17:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236706AbhLHQVa (ORCPT ); Wed, 8 Dec 2021 11:21:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38862 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232235AbhLHQV3 (ORCPT ); Wed, 8 Dec 2021 11:21:29 -0500 Received: from mail-wr1-x430.google.com (mail-wr1-x430.google.com [IPv6:2a00:1450:4864:20::430]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5FAD8C061746 for ; Wed, 8 Dec 2021 08:17:57 -0800 (PST) Received: by mail-wr1-x430.google.com with SMTP id t18so4934749wrg.11 for ; Wed, 08 Dec 2021 08:17:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=XudR5QwbKwmMIdTWdxeMrD6caTZkAvE0b72zbhBzI50=; b=MSBoGk02QOdIPAonhp7MBQGtOMs2d2pLeUFrw4sx2zVj78Bot2Pu++a9IQ9arYfGc+ XBXI4f/Zh+MZNarXEN078pbHRx064kH5PbQMqirEVgBVhWjZE55etYdEMbK1EopO8bLT 5TFLKAhgu5X9i7CgutroZC2MttxWAx5ClOnsj2rLHGqZpP51P4sEZeqE6+CGtFBq8Tgt rq2MvtXZuN0roGIkYcsl3xtV5/j2m4U2GRQdoN0cTq8v81064ncaR/qlyR0kI0z7JkMz qufogI/Gskc7FW1oLPAiv/ogkRcx7jn4cT64D7xQnmuSjBcQdj02gxQVo9UYL+bYgKNh 8H7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=XudR5QwbKwmMIdTWdxeMrD6caTZkAvE0b72zbhBzI50=; b=ldSNlMEpxKLx6W1sYNJVUaiJIvTa6Cp5zBtPS/RXcWXN3m6o3EydekavAhJeTwdMqc 05nxJV0WTeyHArHivexMAynXaYRg/LB2cHmqw9nXfhpPnbpA9+g6M2aFsHrNj4lsUJkk LmbDfzEEftTs/k2mhDpZgv8l/ZGV8KIGzs7RVm+e/uQOHXFy4/zVhC3l4GqTTK+eb/cn ZWLxkQkOjRMNDTeyghncnbxkSEVFHNhUuvrUp+umrexOhiEcdF86XSX5WmSIGgsj0VUc Aaag4+HY/EYlXQY2IK/DaYIy5bfjzuZ6lw0QAyFuawOwPqQTcniXMAmpXiVl43sPemRJ fbcg== X-Gm-Message-State: AOAM533aoLsN2w+3I1O5bRCDyhiwl8G0pzBcL9+LINtH1PqfgmVdrd8X 5WLG6V2FhY6sltHOkk8/0OBWJeYO5SoqDwHUEkSoqTYsutfR3xys X-Google-Smtp-Source: ABdhPJzIfb/G70ZKYOvkfAgLKJkiT/YbzYOh5Qus7tyAWqMTM7hM4m+uKUW+pRNOkcUNRxjIcWaEEm6BCa+fhZnKSfg= X-Received: by 2002:adf:f209:: with SMTP id p9mr58643982wro.191.1638980275764; Wed, 08 Dec 2021 08:17:55 -0800 (PST) MIME-Version: 1.0 References: <20211207190251.18426-1-davidgow@google.com> <202112071358.E8E6812D@keescook> In-Reply-To: <202112071358.E8E6812D@keescook> From: David Gow Date: Thu, 9 Dec 2021 00:17:44 +0800 Message-ID: Subject: Re: [RFC PATCH v2] Documentation: dev-tools: Add KTAP specification To: Kees Cook Cc: Brendan Higgins , Tim.Bird@sony.com, shuah@kernel.org, Jonathan Corbet , rmr167@gmail.com, guillaume.tucker@collabora.com, dlatypov@google.com, kernelci@groups.io, kunit-dev@googlegroups.com, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Dec 8, 2021 at 6:02 AM Kees Cook wrote: > > On Tue, Dec 07, 2021 at 11:02:51AM -0800, David Gow wrote: > > From: Rae Moar > > > > It does not make any significant additions or changes other than those > > already in use in the kernel: additional features can be added as they > > become necessary and used. > > > > [1]: https://testanything.org/tap-version-13-specification.html > > > > Signed-off-by: Rae Moar > > Co-developed-by: David Gow > > Signed-off-by: David Gow > > I like it! Thank you so much for suffering through my earlier reviews. > :) > > The only concern I have is wonder what'll be needed to kselftest to > deal with indentation changes. As long as this can be implemented > without a subtest knowing it is a subtest, we're good. I'd think a minor tweak to the prefix.pl script should handle it for most tests: https://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest.git/tree/tools/testing/selftests/kselftest/prefix.pl Certainly the indent should be the only difference between a top-level test result and a subtest now. And, if the results do use test plans (i.e., state how many tests are expected beforehand) it's possible to parse the results even without indentation. It it looks like it would be a problem, we could explicitly state that indentation is optional if a test plan is present (or provide some other mechanism for detecting the end of the subtests: just checking the test number has some corner cases which'd fail, but doing something akin to the "Subtest:" header TAP14 used makes this pretty robust). Things like that would overcomplicate it a bit, though, and might end up verging back on "tests need to know they're subtests" territory, depending on the exact implementation, so I think things are probably better as-is. Cheers, -- David