Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp4860712rwb; Mon, 21 Nov 2022 12:59:19 -0800 (PST) X-Google-Smtp-Source: AA0mqf4/ORFLEh7w4assnjO0LKiu9O8cCuJGHNVOFlWcx1nPn2mpnXs80fIXpwo9ZWo9GhCLjeaM X-Received: by 2002:a17:906:9255:b0:7ad:c66e:ad9d with SMTP id c21-20020a170906925500b007adc66ead9dmr16384475ejx.413.1669064358749; Mon, 21 Nov 2022 12:59:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669064358; cv=none; d=google.com; s=arc-20160816; b=ILY9dBZRCeel7nH+4qtvfo51uO1lzmU7/d3J2LS+doxoPt2epLH5iMLMVcngl1R0c4 CLO5OQqbVF6ITQodJW8dGBSAzagNR9dQa5500Jp21Iq4Sb4GHfab6jRZPrGZFveJJrSC p6vcmrr4pkAvr/Gg1JnPA8bkLAkbX7F4/KGQd/4rWGHeF0bSjvIEGYRM2kX0ottev0wz h5lHNPgw5OmPxVad9kDiMXGNkeQiedfx/sqG/dyB42glu2y3EXhRNQ7yvyu6ZqNSSsyV G/KKsVJJ/JOggFB/E3Qau5dgrwFApCLZGxSWzNg76ji5oDzH3pq0THm06x9cL1R+03HL RbEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=eFlNQB0BzOryXQoC76S+j2lOLcpwit4Btksu9yTgRsY=; b=dBJ6Om3SKy+n+n1o4wCUHHFnlDFjuq2mjMQsKT9OvjdDsNKMJmQhEdDMR8pMMbYgVq oV9rd6wQBm/BCK/WW141IL+c91L2s/qD/JlUL90wSWRDO2lkLVtgZIuVFCrv8ErNXq5Q nhi44qfsht1oko9ORTy0emIta4REEqBm+dR0nzwqqq0LKETiGVwhLFo9FMW01H65xfH5 niw1B+M8xV8/QvwvGhEhYNn3w26T9Mix2N+Eb6cDuUp8U0cw8w9xIw/UYJEcs77elmnr 6zFo1h/OSZR3+wwTCjybBqHC8fDKoszn8fmX6+VrIswcUOWwrzoUv6lFDTgYxOyZeX1w Xptg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=emDy57bP; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id mp22-20020a1709071b1600b007801a197a1bsi7874385ejc.449.2022.11.21.12.58.57; Mon, 21 Nov 2022 12:59:18 -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=@google.com header.s=20210112 header.b=emDy57bP; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229874AbiKUUch (ORCPT + 91 others); Mon, 21 Nov 2022 15:32:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42846 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229527AbiKUUcf (ORCPT ); Mon, 21 Nov 2022 15:32:35 -0500 Received: from mail-yb1-xb30.google.com (mail-yb1-xb30.google.com [IPv6:2607:f8b0:4864:20::b30]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A976CF07 for ; Mon, 21 Nov 2022 12:32:33 -0800 (PST) Received: by mail-yb1-xb30.google.com with SMTP id b131so14951356yba.11 for ; Mon, 21 Nov 2022 12:32:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=eFlNQB0BzOryXQoC76S+j2lOLcpwit4Btksu9yTgRsY=; b=emDy57bPo48C6Pc8nXPRpN4xXWiUhcEZgwTUEAzj6ewhRp0qN1po2N1NtvVbD8Qkvd bHd6/Atgtf6wdsG+SThtlCsH8Prp8nmBRROWiV9ZyavVu+rlFOkqq/tXI0cGM36scvik DxqxW1dquDCX5xApu/Iz5SOkfTEatLupPlX8zquR1DgsPpVXieh7I6wvAM4itzMUr7Ao M3TWCEWQldxflcqhD85cXsveyqXk9LT30yXQrnAXpxqzHS8UOgmVAU2G0djVMMQ2w1Na ZvYaochVDaU8jQ0lgzSu56NQ/DR2p3FVwHaZdty6ncQO6cu1xip97/dXrFdWSCElGbue t7qg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=eFlNQB0BzOryXQoC76S+j2lOLcpwit4Btksu9yTgRsY=; b=3qktzznTnjBV3/Je7QgyicEYCpqILp/fySJcgt/uhBodEQMeep4hR0y0/boyDJW7em gPCAl2QoP0a4c/FAOr1KD9fdkTpiOHnNcKXYshZkfgW884VIx3aAI6/T9uRWRhtwCH6W FHlaCrylnnzU56E9MoveEBBkftoQZBQ2XtUJKCaba6XHbO8RUmhyKhpBe/mhHN1zlpgo PRiZlQ5q2HvrJmSm2zRKYozW8pQggulo+130l9lTTCzmAMgICECtohUqJ4r+xhFf2Vax WsPg4WgS1PppY/ORUoOTVu0OCkRnYtr0qZ+PF10W727ncxIw2QLVDYWHa3GKBzGuhFO/ nRgQ== X-Gm-Message-State: ANoB5pkVNfZ4IkHls4NzEGIeHnyGlf2YdgGz3v9wLXAD3iA/84dYX3vr TbImtZsAtIvrdy7Arzj9y2zyeuZAP9kqfRDb6C3MfA== X-Received: by 2002:a25:d2cf:0:b0:6cf:e761:43e1 with SMTP id j198-20020a25d2cf000000b006cfe76143e1mr19116339ybg.650.1669062752576; Mon, 21 Nov 2022 12:32:32 -0800 (PST) MIME-Version: 1.0 References: <20221121184743.1123556-1-rmoar@google.com> <20221121184743.1123556-2-rmoar@google.com> In-Reply-To: <20221121184743.1123556-2-rmoar@google.com> From: Daniel Latypov Date: Mon, 21 Nov 2022 12:32:21 -0800 Message-ID: Subject: Re: [PATCH v2 2/2] kunit: improve KTAP compliance of KUnit test output To: Rae Moar Cc: brendanhiggins@google.com, davidgow@google.com, skhan@linuxfoundation.org, mauro.chehab@linux.intel.com, kunit-dev@googlegroups.com, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, isabbasso@riseup.net, anders.roxell@linaro.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL 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 Mon, Nov 21, 2022 at 10:48 AM Rae Moar wrote: > > Change KUnit test output to better comply with KTAP v1 specifications > found here: https://kernel.org/doc/html/latest/dev-tools/ktap.html. > 1) Use "KTAP version 1" instead of "TAP version 14" as test output header > 2) Remove '-' between test number and test name on test result lines > 2) Add KTAP version lines to each subtest header as well > > Note that the new KUnit output still includes the =E2=80=9C# Subtest=E2= =80=9D line now > located after the KTAP version line. This does not completely match the > KTAP v1 spec but since it is classified as a diagnostic line, it is not > expected to be disruptive or break any existing parsers. This > =E2=80=9C# Subtest=E2=80=9D line comes from the TAP 14 spec > (https://testanything.org/tap-version-14-specification.html) > and it is used to define the test name before the results. > > Original output: > > TAP version 14 > 1..1 > # Subtest: kunit-test-suite > 1..3 > ok 1 - kunit_test_1 > ok 2 - kunit_test_2 > ok 3 - kunit_test_3 > # kunit-test-suite: pass:3 fail:0 skip:0 total:3 > # Totals: pass:3 fail:0 skip:0 total:3 > ok 1 - kunit-test-suite > > New output: > > KTAP version 1 > 1..1 > KTAP version 1 > # Subtest: kunit-test-suite > 1..3 > ok 1 kunit_test_1 > ok 2 kunit_test_2 > ok 3 kunit_test_3 > # kunit-test-suite: pass:3 fail:0 skip:0 total:3 > # Totals: pass:3 fail:0 skip:0 total:3 > ok 1 kunit-test-suite > > Signed-off-by: Rae Moar > Reviewed-by: Daniel Latypov > Reviewed-by: David Gow > --- > > Changes since v1: > https://lore.kernel.org/all/20221104194705.3245738-1-rmoar@google.com/ > - Switch order of patches to make changes to the parser before making > changes to the test output > - Change location of the new KTAP version line in subtest header to be > before the subtest header line This patch still looks good to me. In fact, it looks better. I prefer this updated version since this works a bit better with debugfs. This way, kunit.py won't just skip over the subtest line when looking for the initial KTAP header. Daniel