Received: by 2002:a05:6358:5282:b0:b5:90e7:25cb with SMTP id g2csp1754527rwa; Sun, 21 Aug 2022 16:34:07 -0700 (PDT) X-Google-Smtp-Source: AA6agR6T8PpLMcWMO/eKC/ZOqwW4dENTVcuX371cwKHauWOzSaQdKlbPqs83catC5cUgq3ffKefj X-Received: by 2002:a17:906:53ca:b0:73a:7443:7c42 with SMTP id p10-20020a17090653ca00b0073a74437c42mr11174528ejo.761.1661124847103; Sun, 21 Aug 2022 16:34:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661124847; cv=none; d=google.com; s=arc-20160816; b=EdFE80W0oS/1WHnqb6l4755bJ6n933I0iLEa4E3FG7Hfu8X5gnrxXnLOWjX6S1uc9u no/nKYItPLpJIOQTSpd0AFP9qtKYhF7WXL0YsucJN5GDIoCAmdZs6UbSvkvt6i1glkij itcG5vMyMGFCw5qYpXjKNbg+moF+NFRbog1teNRrfgaUurIIBT5eF2UgkQtIi/l8y1uF QXanMWhef3tLSbtxJ/0a0peIGRyrmb/HheQxsqdJx0veHv/bVDLK2p7lIkBv8m1IiW7w HwmDL8eVR89fqrm/ynHhA62rqpR8GEl+fRInFo3Uq47ak2o0LKOjoTDLNCsmBfKhJtHk Hz4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version:dkim-signature; bh=ccrF4EfkahHpt/9Pba8wQctpnDNAB+Jj9k09ArPwhpc=; b=R6ZsMvIEnKNIB+5+Il3Pf1dL8T94OXSPOD3hTJOM5lAEpwXtzY3657Pks10RfH2DzZ S6e71G4B/8Oo1EyHs9bKV5sW0k3ymR7M3Dt6L3A+xFy23f1tKQJ43Cq147eHmq6N1kpi Y+p6aXzENFKIivbaMwEb7ioS4jU+v0y8Q2cBLArTaMeuFxVhugJG31ajCjOhDo1U0MNv /NHd/HUdYthKWejhqwLzjZCQpvpwfKVk+IeHxDJ8kFdnHe192ApRz3nTrOdASfgEifA+ JgvsPJIYDNBKbnq1JFJ8J2nOT8SengUj9n7ECESlakE3NikI4vAx/3uGovX/9AQhv75f C/xg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@riseup.net header.s=squak header.b=Uiv66D+U; 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=NONE dis=NONE) header.from=riseup.net Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id oz15-20020a1709077d8f00b0073305fd2278si8548322ejc.864.2022.08.21.16.33.34; Sun, 21 Aug 2022 16:34:07 -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=@riseup.net header.s=squak header.b=Uiv66D+U; 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=NONE dis=NONE) header.from=riseup.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231429AbiHUWWq (ORCPT + 99 others); Sun, 21 Aug 2022 18:22:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54310 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229541AbiHUWWp (ORCPT ); Sun, 21 Aug 2022 18:22:45 -0400 Received: from mx1.riseup.net (mx1.riseup.net [198.252.153.129]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3D59A183B1; Sun, 21 Aug 2022 15:22:44 -0700 (PDT) Received: from fews1.riseup.net (fews1-pn.riseup.net [10.0.1.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mail.riseup.net", Issuer "R3" (not verified)) by mx1.riseup.net (Postfix) with ESMTPS id 4M9qkB3q3RzDr9K; Sun, 21 Aug 2022 22:22:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak; t=1661120563; bh=ccrF4EfkahHpt/9Pba8wQctpnDNAB+Jj9k09ArPwhpc=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=Uiv66D+U+gLOe7JE6i/oAl/E0FWpEbo+VZnWG24uszi9cNT1zkOpc8pufuhTFZ9lN MONx1BfcGTjtuMpMB2ydJ3EM7TveoQ6vG30WQlY5Oalfp9Wy56W/RPOs32B8HVdv/0 4H0cTd/hcAahRWzr89TMVLCtK9O4eq5WYQK7fz6w= X-Riseup-User-ID: 8AD00409068A65E08A13AA40A73B9388512B00AE92B6AD68FCA47EEA686532D1 Received: from [127.0.0.1] (localhost [127.0.0.1]) by fews1.riseup.net (Postfix) with ESMTPSA id 4M9qk239Jyz5vY6; Sun, 21 Aug 2022 22:22:33 +0000 (UTC) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\)) Subject: Re: [PATCH v5 9/9] drm: selftest: convert drm_mm selftest to KUnit From: Isabella Basso In-Reply-To: <20220722162529.wy4ox7pyjhno66lz@macragge.hardline.pl> Date: Sun, 21 Aug 2022 19:22:30 -0300 Cc: =?utf-8?Q?Ma=C3=ADra_Canal?= , Matthew Auld , Arthur Grillo , Rodrigo Siqueira , David Airlie , Daniel Latypov , brendanhiggins@google.com, ML dri-devel , linux-kselftest@vger.kernel.org, n@nfraprado.net, andrealmeid@riseup.net, magalilemes00@gmail.com, Javier Martinez Canillas , kunit-dev@googlegroups.com, mwen@igalia.com, David Gow , Shuah Khan , =?utf-8?Q?Micha=C5=82_Winiarski?= , tales.aparecida@gmail.com, kernel list , leandro.ribeiro@collabora.com, Thomas Zimmermann , =?utf-8?B?Sm9zw6kgRXhww7NzaXRv?= Content-Transfer-Encoding: quoted-printable Message-Id: <52481C88-9CD7-4E4F-ABCB-1EFC01E4B4D0@riseup.net> References: <20220708203052.236290-1-maira.canal@usp.br> <20220708203052.236290-10-maira.canal@usp.br> <20220722162529.wy4ox7pyjhno66lz@macragge.hardline.pl> To: =?utf-8?Q?Micha=C5=82_Winiarski?= X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,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 Hi Micha=C5=82, While I totally understand your point, we have talked about this in our = GSoC meetings with mentors, and have found a few reasons as to why a KUnit = runner integrated to IGT might be really useful.=20 > Am 22/07/2022 um 1:25 PM schrieb Micha=C5=82 Winiarski = : >=20 > On Fri, Jul 22, 2022 at 08:04:51AM -0300, Ma=C3=ADra Canal wrote: >> On 7/22/22 07:35, Matthew Auld wrote: >>> On Fri, 8 Jul 2022 at 21:32, Ma=C3=ADra Canal = wrote: >>>>=20 >>>> From: Arthur Grillo >>>>=20 >>>> Considering the current adoption of the KUnit framework, convert = the >>>> DRM mm selftest to the KUnit API. >>>=20 >>> Is there a plan to convert the corresponding selftest IGT that was >>> responsible for running this (also drm_buddy) to somehow work with >>> kunit? Previously these IGTs were always triggered as part of >>> intel-gfx CI, but it looks like they are no longer run[1]. >>>=20 >>> [1] https://gitlab.freedesktop.org/drm/intel/-/issues/6433 >>=20 >> Hi Matthew, >>=20 >> Isabella sent a while ago a patch to IGT adding KUnit compatibility = to >> IGT [1], but there wasn't any feedback on the patch. I believe that = soon >> she will resend the series in order to make all KUnit DRM tests run = on IGT. >>=20 >> Any feedback on the patch is welcomed so that we can fix this issue = as >> soon as possible. >>=20 >> [1] https://patchwork.freedesktop.org/patch/489985/ >>=20 >> Best Regards, >> - Ma=C3=ADra Canal >=20 > Hi. >=20 > Instead of going back to using IGT for *unit* tests, it would be a = better idea > to adjust the CI to just run the tests once at "build" time (just like = e.g. > checkpatch). First, I=E2=80=99d like to point out that there would be some inherent = overhead in doing so, which might actually not be worth it, as KUnit tool would need = to compile HEAD in the UML arch, then we=E2=80=99d have to re-compile = everything to a real machine=E2=80=99s architecture, like x86_64 (in the least), having in = mind still that arch-dependent issues would not show up when we run tests in UML, so = there=E2=80=99s still a downside to it even if it=E2=80=99s quick enough. Even if we don=E2=80=99t run them as UML and instead use a VM, there=E2=80= =99s a VM being run just for a couple of tests, which might be slower than adding a step to = a dedicated machine that=E2=80=99s (probably) already available, plus the = setup and hardware needed to run a VM inside of a CI runner are overheads in = themselves, needing dedicated, modern machines. > We would then stop executing the same test multiple times on different = machines > (note that both DRM selftests and i915 "mock" selftests are pure unit = tests - in > other words, they don't need the hardware to be present), which would = save some > (small) amount of machine-time that can be utilized to do something = that > actually needs the hardware. I totally agree with your solution in regards to arch-independent tests, = though. > Plus there's no need to maintain the kunit-runner in IGT. > Note - we're currently going to lose "DMESG-WARN" detection if we go = this route, > but this is something that can be improved on the kunit-side. >=20 > -Micha=C5=82 There=E2=80=99s also a point to be made on maintaining such a runner if = we think about companies like AMD, as they rely heavily on IGT, so they have lots of = tests written in there, and it'd be difficult for them to accommodate one more non-trivial thing to their CI. Plus I think this might be a good = starting point for them to transition their CI to a KUnit-centered approach without = stressing engineers unnecessarily. Cheers, =E2=80=94 Isabella