Message ID | 20230720-kms-kunit-actions-rework-v2-0-175017bd56ab@kernel.org |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:c923:0:b0:3e4:2afc:c1 with SMTP id j3csp3043495vqt; Thu, 20 Jul 2023 04:19:29 -0700 (PDT) X-Google-Smtp-Source: APBJJlGf0Wp0IT6ltlZ5NSlVoLQp/lGqzVylnvyMg5XEMIBejchYbxEoLy8gahHfp0+lJkCWlxcX X-Received: by 2002:aa7:cfce:0:b0:514:9934:de96 with SMTP id r14-20020aa7cfce000000b005149934de96mr1727351edy.26.1689851969560; Thu, 20 Jul 2023 04:19:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689851969; cv=none; d=google.com; s=arc-20160816; b=aN8HfgqTjhGkuOsAgtYgSlLIgWard1j97rGV20yKt1WW8LpZX4pONALv0CJQf79F2q J5tOCBCtIa5cOZb5z1oQhzQc1cXWzCjKZQICAOF4oygt8PL034vsqNUNl2QJs+oFu71e 7qgg2F5A6USnKIJIChLA1fyk8PrbcCnqRC7HIMHbZpzAsGzWtACUG9OIEigvwLv4r10b TVTX53nLC1P90TsrNbVdFcNYdZu4HpoikJjVe+d7aXQQ+SXneYn6jF+aNYlI8o4GXP/b Mi1mSq7ZDsZ/dWElmt4c6Xhsye4rgunq4Ddg8QwLBZX0V4+ENDG6ATMa8bnbgC4PrMfe wfzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:content-transfer-encoding:mime-version :message-id:date:subject:from:dkim-signature; bh=/2AIvZpNdjwtCRe9D/2T/V/wIBhoVXf9JQ1FK1lEL98=; fh=r3YnEVRF2ge3yIgpTE2H86lvFoURZyw1nrIW71mPVsw=; b=BCNZwRmtnW7lgy6QBXvefCpuGIb+ID3F7y0OyGUqbQQM4SbqJMb8pLjYM2K4wQk81p UASPttej26Dvrj/oeYx1Af3oFfaFU6Xol/4SBH23ERZZtX30dxvUtTJlgRfjqt93Cg3A cok+P7WLgeerKqEjP5H7+aojXsU1mInZEybI4PiPRtfQNaboLQxM4eGIeXBWl1AGH/Dy TVW+a5xqHALPk1QbhL0XLXECi3ZcmTF1HzCcs0unYhdtcBwWCXz486stuf3LnK5INNUL oSqu9XCb0HPq0TKx9XivaLTNnXoqaPa6y9uUGC0wbHo1l/iTXAoHi9pxo+9F8cE9Ozlo iZvw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=AADqVC6n; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bc6-20020a056402204600b0051e0d936760si670824edb.14.2023.07.20.04.19.05; Thu, 20 Jul 2023 04:19:29 -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=AADqVC6n; 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 S229655AbjGTLQ2 (ORCPT <rfc822;assdfgzxcv4@gmail.com> + 99 others); Thu, 20 Jul 2023 07:16:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57054 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229640AbjGTLQ1 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 20 Jul 2023 07:16:27 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EB4402D40; Thu, 20 Jul 2023 04:15:57 -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 2225561A35; Thu, 20 Jul 2023 11:15:56 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D8AAAC433C7; Thu, 20 Jul 2023 11:15:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1689851755; bh=73gGluoq2h/z3lT1moMzLu5ggv2o12BR1rQu/YvuDqY=; h=From:Subject:Date:To:Cc:From; b=AADqVC6n/KiENfSQgakkG568Mj9vRtv0ERfGsfDctE6jDIVSEN6cMtCGWbrLGmqKR L3SIW0TdsOkVo+xu6/8erHdegTNEs8vpHC6lixIgddDkM/2gVvjXLPLswIUMjXTilO 59DoFDb0Y68jl4akGEGNPTx1PNnCOz0kIl018edRfuLPycDuF+TR1dNXZCfuxBenel DCrO4z299FCeicz7yLBJWiir/vYXu7GTFs5c20jjoeQWtBfjngKr4ub92lIOiYfwdj /LW8f0v/Xb6enJJqo052utJOKgyA7owoyQ3s6kb+8If4e/akvHxp+Bj6fOUJAllSA1 UsOxQOK7alz2Q== From: Maxime Ripard <mripard@kernel.org> Subject: [PATCH v2 00/11] drm: kunit: Switch to kunit actions Date: Thu, 20 Jul 2023 13:15:45 +0200 Message-Id: <20230720-kms-kunit-actions-rework-v2-0-175017bd56ab@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-B4-Tracking: v=1; b=H4sIAGEXuWQC/42NQQ6CMBBFr0Jm7Zh2CFRdeQ/DAssITbUlU0QN4 e5WTuDy/fz//gKJxXGCU7GA8OySiyED7QqwQxt6RtdlBlJUKqMV+kdC/wxuwtZOuZxQ+BXFY9X pujQ12WN5hTwfhW/uvakvTebBpSnKZ3ua9S/9QzprVGiIbHXoDFlDZ88S+L6P0kOzrusXP7+xq cEAAAA= To: David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>, Maarten Lankhorst <maarten.lankhorst@linux.intel.com>, Thomas Zimmermann <tzimmermann@suse.de>, Emma Anholt <emma@anholt.net> Cc: =?utf-8?q?Ma=C3=ADra_Canal?= <mairacanal@riseup.net>, Javier Martinez Canillas <javierm@redhat.com>, dri-devel@lists.freedesktop.org, David Gow <davidgow@google.com>, linux-kselftest@vger.kernel.org, kunit-dev@googlegroups.com, linux-kernel@vger.kernel.org, Maxime Ripard <mripard@kernel.org>, Brendan Higgins <brendan.higgins@linux.dev> X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=2029; i=mripard@kernel.org; h=from:subject:message-id; bh=73gGluoq2h/z3lT1moMzLu5ggv2o12BR1rQu/YvuDqY=; b=owGbwMvMwCX2+D1vfrpE4FHG02pJDCk7xTNWPPmlmWOcu0Oi23rVl1XGqpOqOL5N+H3u4vnEy sWKaxUfdpSyMIhxMciKKbLECJsviTs163UnG988mDmsTCBDGLg4BWAiL+YyMnSKrZ36OHzmhbBv dk/MJgpcFJT4N72hPY9Hfcsugctlx3IYfrMeqdK8sq500gHZ/W+nzDfx1P33Ja+mm0k4eKWus5X ZEW4A X-Developer-Key: i=mripard@kernel.org; a=openpgp; fpr=BE5675C37E818C8B5764241C254BCFC56BF6CE8D X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771020268471091763 X-GMAIL-MSGID: 1771938218977269677 |
Series |
drm: kunit: Switch to kunit actions
|
|
Message
Maxime Ripard
July 20, 2023, 11:15 a.m. UTC
Hi,
Since v6.5-rc1, kunit gained a devm/drmm-like mechanism that makes tests
resources much easier to cleanup.
This series converts the existing tests to use those new actions where
relevant.
Let me know what you think,
Maxime
Signed-off-by: Maxime Ripard <mripard@kernel.org>
---
Changes in v2:
- Fix some typos
- Use plaltform_device_del instead of removing the call to
platform_device_put after calling platform_device_add
- Link to v1: https://lore.kernel.org/r/20230710-kms-kunit-actions-rework-v1-0-722c58d72c72@kernel.org
---
Maxime Ripard (11):
drm/tests: helpers: Switch to kunit actions
drm/tests: client-modeset: Remove call to drm_kunit_helper_free_device()
drm/tests: modes: Remove call to drm_kunit_helper_free_device()
drm/tests: probe-helper: Remove call to drm_kunit_helper_free_device()
drm/tests: helpers: Create a helper to allocate a locking ctx
drm/tests: helpers: Create a helper to allocate an atomic state
drm/vc4: tests: pv-muxing: Remove call to drm_kunit_helper_free_device()
drm/vc4: tests: mock: Use a kunit action to unregister DRM device
drm/vc4: tests: pv-muxing: Switch to managed locking init
drm/vc4: tests: Switch to atomic state allocation helper
drm/vc4: tests: pv-muxing: Document test scenario
drivers/gpu/drm/tests/drm_client_modeset_test.c | 8 --
drivers/gpu/drm/tests/drm_kunit_helpers.c | 108 +++++++++++++++++++++-
drivers/gpu/drm/tests/drm_modes_test.c | 8 --
drivers/gpu/drm/tests/drm_probe_helper_test.c | 8 --
drivers/gpu/drm/vc4/tests/vc4_mock.c | 5 ++
drivers/gpu/drm/vc4/tests/vc4_test_pv_muxing.c | 115 +++++++++---------------
include/drm/drm_kunit_helpers.h | 7 ++
7 files changed, 158 insertions(+), 101 deletions(-)
---
base-commit: c58c49dd89324b18a812762a2bfa5a0458e4f252
change-id: 20230710-kms-kunit-actions-rework-5d163762c93b
Best regards,
Comments
Hi Maxime, On 7/20/23 08:15, Maxime Ripard wrote: > Hi, > > Since v6.5-rc1, kunit gained a devm/drmm-like mechanism that makes tests > resources much easier to cleanup. > > This series converts the existing tests to use those new actions where > relevant. > > Let me know what you think, With the problems pointed out by kernel test bot fixed, the whole series is: Reviewed-by: Maíra Canal <mairacanal@riseup.net> Best Regards, - Maíra > Maxime > > Signed-off-by: Maxime Ripard <mripard@kernel.org> > --- > Changes in v2: > - Fix some typos > - Use plaltform_device_del instead of removing the call to > platform_device_put after calling platform_device_add > - Link to v1: https://lore.kernel.org/r/20230710-kms-kunit-actions-rework-v1-0-722c58d72c72@kernel.org > > --- > Maxime Ripard (11): > drm/tests: helpers: Switch to kunit actions > drm/tests: client-modeset: Remove call to drm_kunit_helper_free_device() > drm/tests: modes: Remove call to drm_kunit_helper_free_device() > drm/tests: probe-helper: Remove call to drm_kunit_helper_free_device() > drm/tests: helpers: Create a helper to allocate a locking ctx > drm/tests: helpers: Create a helper to allocate an atomic state > drm/vc4: tests: pv-muxing: Remove call to drm_kunit_helper_free_device() > drm/vc4: tests: mock: Use a kunit action to unregister DRM device > drm/vc4: tests: pv-muxing: Switch to managed locking init > drm/vc4: tests: Switch to atomic state allocation helper > drm/vc4: tests: pv-muxing: Document test scenario > > drivers/gpu/drm/tests/drm_client_modeset_test.c | 8 -- > drivers/gpu/drm/tests/drm_kunit_helpers.c | 108 +++++++++++++++++++++- > drivers/gpu/drm/tests/drm_modes_test.c | 8 -- > drivers/gpu/drm/tests/drm_probe_helper_test.c | 8 -- > drivers/gpu/drm/vc4/tests/vc4_mock.c | 5 ++ > drivers/gpu/drm/vc4/tests/vc4_test_pv_muxing.c | 115 +++++++++--------------- > include/drm/drm_kunit_helpers.h | 7 ++ > 7 files changed, 158 insertions(+), 101 deletions(-) > --- > base-commit: c58c49dd89324b18a812762a2bfa5a0458e4f252 > change-id: 20230710-kms-kunit-actions-rework-5d163762c93b > > Best regards,
On Thu, 20 Jul 2023 13:15:45 +0200, Maxime Ripard wrote: > Since v6.5-rc1, kunit gained a devm/drmm-like mechanism that makes tests > resources much easier to cleanup. > > This series converts the existing tests to use those new actions where > relevant. > > Let me know what you think, > Maxime > > [...] Applied to drm/drm-misc (drm-misc-next). Thanks! Maxime