Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp4367059rwb; Mon, 31 Jul 2023 06:02:47 -0700 (PDT) X-Google-Smtp-Source: APBJJlHb8oPwdZ6NUV+q9Ca58PsB2W/lSrc+iLDQY5hq1n+thIg0L57qn6DCUksqCMeF6lIOrQi5 X-Received: by 2002:a17:906:101a:b0:99b:d9f3:9a98 with SMTP id 26-20020a170906101a00b0099bd9f39a98mr5958124ejm.74.1690808567120; Mon, 31 Jul 2023 06:02:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690808567; cv=none; d=google.com; s=arc-20160816; b=vRaNhjNI0z5152RfZWXg1yVXh2dRF/N4vPNuAysAS2+VNvXciwPBOnIQA2raUASb6S ix+rGfFIyZuZIzOj+kB5NtRVv7Ycn656WIlfUW+cO78bTVleE3V3XjLNtPVynjxwI6Bw FnwD5yIQWwRhoolXvwIVwbEA+DuEpwBR9W81NEXiNZBWULEnElpEQAB+ya7mTwT4uhLH bKzvDMDQwxXNKrC8onfsOqSVgVyTGW1YitqYHKfxgEEYyLC4syZPc+U2QPLR/gkYIIoU MaEElvM8/lWxy2A28orX40IuHlKcXZBml78vG14Avhe+m9QB6/LxfYF4pX9c+6QlrERd WnVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=mjHB0oE+u0miZUPLORFpSYeugjJtcfsOgGsKIn9R/70=; fh=c3iedA7iVjsfShyIXp4fkiIlrq7u7iV2PQHL0LdZiGw=; b=ifnpXnewfyTlFCd33X6L5c+ubyv+OE5RIacxeexA0F1sakawD8OXe84EFf5P/qa1/E lSFun6/8hDw2UK7ITplWOBgKA4MPLosST7IbJxnqX/SHAVlaG0phpHSEsnXD/f4jq6Vh bRUqoBmWkySFBCCt88JiWwzvsRD7nVDTeYmwUi/XI1t6atY4x4G9vas8Xi26nwIUOM3W zeGhsRM1ASOAEL3IdkmQS0LGvucljnLoLTcCX7vD78IJA+f6obHV87u9OlNqHWyYY64c U8CrqgwWRKmwqmycE9Ru8NcofntvhrwO/SYQHk9lOD0W/reJzdfYCnLCKIzna4M25OXo Wo3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=QqHovCvM; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id pv24-20020a170907209800b0099bd0683c1esi6625729ejb.949.2023.07.31.06.02.21; Mon, 31 Jul 2023 06:02:47 -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=@kernel.org header.s=k20201202 header.b=QqHovCvM; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230443AbjGaMSY (ORCPT + 99 others); Mon, 31 Jul 2023 08:18:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40698 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229845AbjGaMSX (ORCPT ); Mon, 31 Jul 2023 08:18:23 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 603F911D; Mon, 31 Jul 2023 05:18:22 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id E879F60DF6; Mon, 31 Jul 2023 12:18:21 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D2CA0C433C8; Mon, 31 Jul 2023 12:18:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1690805901; bh=rQ7FJqkGeDX2fugIGTDURaI498a99ibW8f64xuQUqhg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=QqHovCvMTm/tPzp0I6/OWLL07l00ZNmpg3dsQUbvyaWDC8lJ3NOJqZ0dwJjZhEgpf Zfa81FjNlgeOBb/Dz/r1jH816iAcg/ZyXPmGKGc8w6hv+D5Ww3d7HKLPGJFjsYjjQk tPFfYULlsQC0s3ZCqmqsKAqIotkFoM8q3emJbvDKpeiZ3ilcAeFgTsLIMKl3TC9RLG l6JcqptcqlhYa8gEAj59Xn6UUa8G2Qnyq22aL39XlRxZfy4U7NZ3CgzL2Dzu9cmp4K YY0D8G61F8BfYhBohj348VWPGB2WsEf7WXrNFi6MPbnlCsrgHWLBQC/8WrnwTjmWRX ZVbZV56G+ZRag== Date: Mon, 31 Jul 2023 14:18:18 +0200 From: Maxime Ripard To: David Gow Cc: =?utf-8?B?TWHDrXJh?= Canal , Daniel Latypov , brendanhiggins@google.com, Isabella Basso , magalilemes00@gmail.com, tales.aparecida@gmail.com, mwen@igalia.com, andrealmeid@riseup.net, siqueirajordao@riseup.net, Trevor Woerner , leandro.ribeiro@collabora.com, n@nfraprado.net, Daniel Vetter , Shuah Khan , David Airlie , Thomas Zimmermann , michal.winiarski@intel.com, Javier Martinez Canillas , =?utf-8?B?Sm9zw6kgRXhww7NzaXRv?= , kunit-dev@googlegroups.com, linux-kselftest@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Arthur Grillo Subject: Re: [PATCH v5 9/9] drm: selftest: convert drm_mm selftest to KUnit Message-ID: References: <20220708203052.236290-1-maira.canal@usp.br> <20220708203052.236290-10-maira.canal@usp.br> <7yc3fkagtlr4i7qnkulwvfzqjs7v64ddugcc3cxt6g5oawvqoa@ax67ukkrr7jt> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="gu25pblv6cnyjr6c" Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,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 --gu25pblv6cnyjr6c Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi David, On Tue, Jul 25, 2023 at 05:54:32PM +0800, David Gow wrote: > On Tue, 25 Jul 2023 at 16:38, Maxime Ripard wrote: > > On Thu, Apr 27, 2023 at 03:14:39PM +0200, Maxime Ripard wrote: > > > Hi, > > > > > > On Fri, Jul 08, 2022 at 05:30:52PM -0300, Ma=EDra Canal wrote: > > > > From: Arthur Grillo > > > > > > > > Considering the current adoption of the KUnit framework, convert the > > > > DRM mm selftest to the KUnit API. > > > > > > > > Signed-off-by: Arthur Grillo > > > > Tested-by: David Gow > > > > Acked-by: Daniel Latypov > > > > Reviewed-by: Javier Martinez Canillas > > > > Signed-off-by: Ma=EDra Canal > > > > > > I'm very late to the party, but I'd like to discuss that patch some m= ore. > > > > > > Two tests (drm_test_mm_reserve, drm_test_mm_insert) in it take a super > > > long time to run (about 30s each on my machine). > > > > > > If we run all the DRM tests and VC4 tests, each of those two are long= er > > > to run than all the ~300 tests combined. About 100 times longer. > > > > > > I don't think that running for so long is reasonable, and for multiple > > > reasons: > > > > > > - While I don't know drm_mm well, it doesn't look like any of those > > > tests do something that really should take this long. I'm especia= lly > > > skeptical about the fact that we test each operation 8192 times by > > > default. > > > > > > - It makes using kunit more tedious than it should be. Like I said,= on > > > a very capable machine, running the all the DRM and VC4 tests tak= es > > > about 50s with those two tests, ~0.4s without. > > > > > > - The corollary is that it will get in the way of people that really > > > want to use kunit will just remove those tests before doing so, > > > defeating the original intent. > > > > > > > > > I understand that it came from selftests initially, but I think we > > > should rewrite the tests entirely to have smaller, faster tests. It's > > > not clear to me why those tests are as complicated as they are though. > > > > > > Also, going forward we should probably put disencourage tests running > > > that long. Could Kunit timeout/warn after a while if a test is taking > > > more than X seconds to run? > > > > I'd still like to address this. We spend ~90% of the DRM kunit tests > > execution time executing those two tests, which doesn't seem like a > > reasonable thing to do. >=20 > FWIW, KUnit is going to add a "speed" attribute for tests, so that > it's easy to skip tests which are slow: > https://lore.kernel.org/linux-kselftest/20230724162834.1354164-3-rmoar@go= ogle.com/T/#u >=20 > This would allow the slow tests to be marked using KUNIT_CASE_SLOW(), > and then be run via kunit.py --filter "speed>slow". >=20 > It obviously doesn't make the tests themselves any faster, but could > at least make it possible to run only the fast tests during > development, and the full, slower set before sending the patches out > (or in CI), for example. That's awesome, thanks Speaking of which, should we detect in kunit.py tests that should be marked as (super) slow but aren't? Maxime --gu25pblv6cnyjr6c Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQRcEzekXsqa64kGDp7j7w1vZxhRxQUCZMemigAKCRDj7w1vZxhR xWesAP4rTXMKvVI99e3spTFF7uMSs4CI04EwUB1wYNvei90PhQEA6DhZGF6RTZr+ hxJZBu84ZKXD7FHgygKiwKgAbMY0Swc= =FyxO -----END PGP SIGNATURE----- --gu25pblv6cnyjr6c--