Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp3256596rwb; Mon, 19 Sep 2022 18:12:43 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7Kxqmo+Kknh2RiAFrELNZe84pT/mHaKgBLZOJKh8KZfdjXrMiRmXqKB+A3LnXGii8qSC0o X-Received: by 2002:a17:907:270b:b0:77b:17b3:f446 with SMTP id w11-20020a170907270b00b0077b17b3f446mr14858910ejk.415.1663636362819; Mon, 19 Sep 2022 18:12:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663636362; cv=none; d=google.com; s=arc-20160816; b=guC/HJbnoWEG6bhDretA6sBnhgoP3oGdOhQV7RWFBenlWXqgjCM6+yzkWhirkQVy6h WsbcIhHeHzbEWWB/jAW6J2aq3C8P5ga3VYsOZZRh9UZKFWb6jrQd6wce8bjDbpTERIH0 2Az3SxbWJqRwg1P/v32bF95wAyHLCJ/4BXcfuvbMGQomrWlf8ZsqL2Zfr8RN5/tZXSJb dxFwSR/UFPiys/Kp4njw0b6/Hn0cuDKb7vPIfxm1dNIdnIYrNA5rnMdVsRXsu2nWwLvQ SuvFPIP5lH3ED7QE57TuXJOxBg7jYHEPYN2uBe5X+lgfkAi4usNS4Sxuz3olD7tfaaBL PeAg== 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=SHdx658d5eJ351SjXpaHoy80sr1PT1pZTwcVFt7b0mg=; b=Yx3iQwHcDTd+Z0phQml04s9+HQAypxwyMC9cEFjJLjIVtOOqePuiXH2PqD2/0Didq5 tPEC0D9Oolha+XDQM8JNxfgean3hczAsIpD8HPUu6pYPAZPoKGwrZDkn+RI820jHeM27 uDuvwfOHBVx8J4zgat2bc4YFlp262X7ptlBTpuKLpkmIYzXPUke+zMps8TIE0cWaRNif r26BLWehoAFg78z5bwMgzvVS4INMSzzN99Nciwt6p8xSXy3c4oRIu/aFwBwYALWi6ZS/ b7V/PyI4vr3zFnUNNvwKeSt6fadz8OGVj8LVl9LKqra1cNwVKIu7RO6Dwo2PKGHgje3T TAqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=HwAixdnC; 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 dt15-20020a170907728f00b00780febf6610si7036938ejc.81.2022.09.19.18.12.18; Mon, 19 Sep 2022 18:12:42 -0700 (PDT) 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=HwAixdnC; 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 S229688AbiITAZz (ORCPT + 99 others); Mon, 19 Sep 2022 20:25:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58996 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229611AbiITAZx (ORCPT ); Mon, 19 Sep 2022 20:25:53 -0400 Received: from mail-ej1-x630.google.com (mail-ej1-x630.google.com [IPv6:2a00:1450:4864:20::630]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9D40D49B6E for ; Mon, 19 Sep 2022 17:25:51 -0700 (PDT) Received: by mail-ej1-x630.google.com with SMTP id bj12so2360715ejb.13 for ; Mon, 19 Sep 2022 17:25:51 -0700 (PDT) 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; bh=SHdx658d5eJ351SjXpaHoy80sr1PT1pZTwcVFt7b0mg=; b=HwAixdnC9CUd2kg5QsHataIn9+QH16TpCdsKCvu0q/lLdxtFdLWarK6r1H0gR6nMiW Vh9SEE8QJmiF9y3f+efEC0ftqVFriICksaG48w2bYr2n8LQiLKpbrzpgZMgZsaRQeGnR 2OBu/WTyX3ob2AgR1lxX4YHzAu6yVClizQeEUfOZWjR5JZR806GfLDZIntU/7apRjnA3 /VCTcmkX3WTtObbp+9G9hFwHRtup8HsGoaWGpJWgaCb6wjGxRIzCE4FYB9/yX+1y3m9Z f0JRuvLYV6NzDJ5rlGAltQgNLzRfDbii1kRw73ZT66FDqJfo8SITlUBzEXmv6OLLde97 xVYw== 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; bh=SHdx658d5eJ351SjXpaHoy80sr1PT1pZTwcVFt7b0mg=; b=50UCcb5sFuKFT4mO2IZg8p1UTJN59enj0JVw6L+gYks+d+45Yl9T2wGsG1ZbQWjH51 DckVxkf94cloROMFJh4ux5bHdKCgLjZiDurgpRz1BvucmDzsTZkL82fzMUokIUAv+Cqw N6wHPskUER462TaWHKeOT2riBAcZqMgNo/8g0MtBcSPZ5opftkUtXHE6JhqpPQpWqMNL ApjgJrOQLeQhNMalZCHZgqp/UzQdWXWkomKEMkxJmkD70eG7wB+ObpJ//eMp/dS67tW5 LpY68ooLyJubEQ6AgY7ikMXaueMPz+ORlqogZG1Hercpukun/33Q6n3UBeN1Ffrpspgc CjuA== X-Gm-Message-State: ACrzQf0PBv0e08WVP41pVqZHJsQjXD1zYID9Bnzu2RenYbCRiPOGCWou VR0R5JnWCm5XKZIzdgP4A8IozOOVXV8hoyF2N4jiKA== X-Received: by 2002:a17:907:94ca:b0:780:12fb:3c7c with SMTP id dn10-20020a17090794ca00b0078012fb3c7cmr14487810ejc.650.1663633550030; Mon, 19 Sep 2022 17:25:50 -0700 (PDT) MIME-Version: 1.0 References: <20220829000920.38185-1-isabbasso@riseup.net> <20220829000920.38185-4-isabbasso@riseup.net> In-Reply-To: From: Daniel Latypov Date: Mon, 19 Sep 2022 17:25:38 -0700 Message-ID: Subject: Re: [PATCH i-g-t v2 3/4] lib/igt_kmod: add compatibility for KUnit To: Isabella Basso Cc: David Gow , igt-dev@lists.freedesktop.org, Magali Lemes , =?UTF-8?B?TWHDrXJhIENhbmFs?= , Tales Aparecida , Rodrigo Siqueira , Melissa Wen , =?UTF-8?Q?Andr=C3=A9_Almeida?= , Trevor Woerner , leandro.ribeiro@collabora.com, n@nfraprado.net, KUnit Development , Brendan Higgins , Daniel Vetter , Shuah Khan , linux-kselftest@vger.kernel.org, ML dri-devel , daniel@fooishbar.org, kernel list 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=unavailable 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, Sep 19, 2022 at 1:43 PM Isabella Basso wrote= : > >> + * "(K)TAP version XX" should be the first line on all (sub)te= sts as per > >> + * https://www.kernel.org/doc/html/latest/dev-tools/ktap.html#= version-lines > >> + * but actually isn't, as it currently depends on whoever writ= es the > >> + * test to print this info > > > > FYI: we're really trying to fix cases of "missing version lines", > > largely by making the kunit_test_suites() macro work in more > > circumstances. > > > > So while it may be worth still handling the case where this is > > missing, I don't think there are any tests in the latest versions of > > the kernel which should have this missing. > > I=E2=80=99m not sure if I totally get how these work. Every time I run a = KUnit test I > get something like this: https://pastebin.com/7Ff31PMC > > As you can see it has been loaded as a module, just like we intend to do = it > from IGT, and I see no version lines whatsoever. Am I doing something wro= ng? You're doing everything right. The problem is we only print the version line for the *built-in* tests. It never gets printed for tests in loadable modules. Some more details below, if interested. Specifically, it happens in https://elixir.bootlin.com/linux/latest/C/ident/kunit_print_tap_header What David is referring to is we had tests that weren't in modules, but didn't use the normal built-in code path. Those were also missing TAP version lines. But KUnit needs to do better here in the case of modules. The goal was that you'd be able to parse the result of module based tests by something like $ cat /sys/kernel/debug/kunit/*/results | ./tools/testing/kunit/kunit.py pa= rse but this doesn't work because of the lack of a version line. If we add it to each module's test results, then we'll need to update the parse to allow multiple verison lines, I think. Daniel