Received: by 2002:a05:7412:98c1:b0:fa:551:50a7 with SMTP id kc1csp1548177rdb; Mon, 8 Jan 2024 02:52:17 -0800 (PST) X-Google-Smtp-Source: AGHT+IGjiomF2ZkbOYHkLdmSw4n9s2M1nbjoy5xuAI3M/y5n/SpiM2ctqZe7Yb/ASGBSDbUm6JHy X-Received: by 2002:a17:90a:6bc3:b0:28d:2410:9501 with SMTP id w61-20020a17090a6bc300b0028d24109501mr852767pjj.95.1704711137405; Mon, 08 Jan 2024 02:52:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704711137; cv=none; d=google.com; s=arc-20160816; b=DRVIDgSUcqrqy25knuyApgmP2mp/wSbboEtIo7u+AKds7udOBp9JazqaHgmJr3hQTp 1KXJ3i/aEH2tN2l6dxYG45Zc0UO2QztvHMU0/lV5FZ57w3wBjor3SiG8v0e1Yqs4VV/h 2BueE3p4ZI2WBJIi/7y5VEo6CVYqXY0rkIuw7SqGdxcZ334g4R6VTmggG6yvcGIrWaFN FNdmKOFPfSO5JP48PMcu2KsATUxyEc2C/UpJFI7M8qtNjBrWb8AHh8dsfztpNVpvY8qT mUdY5vp3lMDqtiZRIOp5To7mhlKK4v8DEbSBNimj+2bOGG78j70eHumeYGloo+RbKJtv uNXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=rUp5fK8PDHo8umFnXsfr/TpB3MWx1zurNd5uHSY4eCE=; fh=Tg+iK/mtBMU5WI6r3+3lxZk/Qs91S9FQJyDwmQJPOUs=; b=x70X4eFkrIzPnd2x1Y75Nn7GiLJyj78KVRz3y6rmn0OMHdACs2FWBjQRVGaKRuELFp DMKhTxkJI1wPTH6bwpIBvbE6EzP9fj7iYjifm6kQ4o3Sg0FvxppDjiGeXRB5e5JyUbUT fVCAMcbQbYHgNzZf/TfKfMfxGqQ9EwoyBHKvN0zNPV7p3NujGQnuVkecqdhEVuKJS9wN U7+NsrG+aIGo8d+3NWI4th7Qm3qebFxEIWcB2HSdV1CDPx01WAqcflYbHHqITDg5U9Mb amLjrK4Ai7RAYsKd/nQAB6YN/vzUE8UW8iu66XpsaBeM4MwqtuE7GMNWqk0FruGjg3rh 8zRA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=u8cBdJ1m; spf=pass (google.com: domain of linux-kernel+bounces-19359-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-19359-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id q1-20020a17090a2dc100b0028bb6ef97c2si5345986pjm.109.2024.01.08.02.52.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Jan 2024 02:52:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-19359-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=u8cBdJ1m; spf=pass (google.com: domain of linux-kernel+bounces-19359-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-19359-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id BAA42B21ACC for ; Mon, 8 Jan 2024 10:52:13 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C3D5214A97; Mon, 8 Jan 2024 10:52:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="u8cBdJ1m" X-Original-To: linux-kernel@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0661614A84 for ; Mon, 8 Jan 2024 10:52:04 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2089CC43397; Mon, 8 Jan 2024 10:52:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1704711124; bh=sfKZ2kHfxV9HPHSYjliuoTfI7Nt51hYocQh/PZfvhWo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=u8cBdJ1mVHDxUsTD3j5JUxsOq3K41Qj4Y1HUr1B9DvwsuMtfcmd+CudWe0/sjnzLC cB4hULjjgZtaK7rkLRCODemY7h26DLZkoz/00LbyY4lHAvPU6l/Ur92RC4FR8LfQwZ kzl1y9TVWvlTIsSltGO+6cZVSp26O6jX6ZNSZk12WvuD755ddBDw+StfNE5wQRf1BZ TX93I4sjmHbq7FkWra9jo52NOBJfXjZ+siDhGO2UMdOAw5niPrVM26cg3mtqrxzzzP 7UKvXe8bxpOTdhCduu5gbJRjzWS/EQLmtQpvAfhWsnqBAqfbTz5GISCjozhWMU6c9m 8UsEZHxtHJWqg== Date: Mon, 8 Jan 2024 11:52:01 +0100 From: Maxime Ripard To: =?utf-8?Q?Micha=C5=82?= Winiarski Cc: intel-xe@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Rodrigo Vivi , Michal Wajdeczko , Maarten Lankhorst , Thomas Zimmermann , David Airlie , Daniel Vetter , Javier Martinez Canillas , =?utf-8?B?TWHDrXJh?= Canal Subject: Re: [PATCH v4 5/6] drm/tests: managed: Extract device initialization into test init Message-ID: <3yoesok4yzvc565hmlbj4ybdihhzsofqsnpx3bnzg2phlbq3zf@55jn4zo24vvv> References: <20240105101324.26811-1-michal.winiarski@intel.com> <20240105101324.26811-6-michal.winiarski@intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="ynvmvfuteawikynt" Content-Disposition: inline In-Reply-To: <20240105101324.26811-6-michal.winiarski@intel.com> --ynvmvfuteawikynt Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jan 05, 2024 at 11:13:23AM +0100, Micha=C5=82 Winiarski wrote: > It simplifies the process of extending the test suite with additional > test cases without unnecessary duplication. >=20 > Signed-off-by: Micha=C5=82 Winiarski > --- > drivers/gpu/drm/tests/drm_managed_test.c | 37 +++++++++++++++--------- > 1 file changed, 24 insertions(+), 13 deletions(-) >=20 > diff --git a/drivers/gpu/drm/tests/drm_managed_test.c b/drivers/gpu/drm/t= ests/drm_managed_test.c > index 986a38c9144a5..c1fc1f0aac9b2 100644 > --- a/drivers/gpu/drm/tests/drm_managed_test.c > +++ b/drivers/gpu/drm/tests/drm_managed_test.c > @@ -9,6 +9,7 @@ > #include > =20 > struct managed_test_priv { > + struct drm_device *drm; > bool action_done; > }; > =20 > @@ -24,11 +25,26 @@ static void drm_action(struct drm_device *drm, void *= ptr) > * device is released. > */ > static void drm_test_managed_run_action(struct kunit *test) > +{ > + struct managed_test_priv *priv =3D test->priv; > + int ret; > + > + ret =3D drmm_add_action_or_reset(priv->drm, drm_action, priv); > + KUNIT_EXPECT_EQ(test, ret, 0); > + > + ret =3D drm_dev_register(priv->drm, 0); > + KUNIT_ASSERT_EQ(test, ret, 0); > + > + drm_dev_unregister(priv->drm); > + drm_kunit_helper_free_device(test, priv->drm->dev); > + > + KUNIT_EXPECT_TRUE_MSG(test, priv->action_done, "Release action was not = called"); Aside from the message here I already pointed out, Acked-by: Maxime Ripard Maxime --ynvmvfuteawikynt Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQRcEzekXsqa64kGDp7j7w1vZxhRxQUCZZvT0QAKCRDj7w1vZxhR xUjcAP9F4VU4nJFspkaO37BLPuWH06/oUpWOQzG7BGmgtUxEHAEAtUYmuvBS+A0A S8IGzOW+79zQbKpyZgFjz/F8khdc7QE= =zS7P -----END PGP SIGNATURE----- --ynvmvfuteawikynt--