From patchwork Mon Jan 17 23:22:53 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Micha=C5=82_Winiarski?= X-Patchwork-Id: 12715730 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8FBA3C433FE for ; Mon, 17 Jan 2022 23:24:33 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 019E1112546; Mon, 17 Jan 2022 23:24:33 +0000 (UTC) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by gabe.freedesktop.org (Postfix) with ESMTPS id E53CB112546 for ; Mon, 17 Jan 2022 23:24:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1642461871; x=1673997871; h=from:to:cc:subject:date:message-id:in-reply-to: references:content-transfer-encoding:mime-version; bh=6ro2lSA7hpfMrYO7xKE+6JLlzdljkSfgu8tKCG0dnro=; b=A4GR9rxxkMMJzHGqNG2bKgkrLVM9/zXkloUUUhzzWfhhk65uFvISbBBc rmWL3WJmyHRmVy3FWJdrECBJFQWKuz+RQrDFXNF7Gl+oJA6A2j8tiau6M hN0ZQm4sBjTkZwKt2EfNdFpASLoLdSr9p23iJR016B3+BY25UtSp6XsZI CQpacD+aw+yuKHcfItpG70M0uiQ91nd1gIpARV64SsRurG00XiTUhQNHq CK/CcZUtSeKk3GWLGgtx62DGkdjsMJS18mVd7hTnPeyXam2mH1UNmF8eT Xqhxs36js4cX0hP94s6kZBIWdkz+PQZkiXXmXCO2aD0lixnNNAAj6GBJr g==; X-IronPort-AV: E=McAfee;i="6200,9189,10230"; a="244901097" X-IronPort-AV: E=Sophos;i="5.88,296,1635231600"; d="scan'208";a="244901097" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Jan 2022 15:24:31 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,296,1635231600"; d="scan'208";a="474580654" Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by orsmga003.jf.intel.com with ESMTP; 17 Jan 2022 15:24:31 -0800 Received: from fmsmsx601.amr.corp.intel.com (10.18.126.81) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Mon, 17 Jan 2022 15:24:30 -0800 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20 via Frontend Transport; Mon, 17 Jan 2022 15:24:30 -0800 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (104.47.58.169) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.20; Mon, 17 Jan 2022 15:24:30 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=a8yZPYS3WG7uNRk02IKjRfwdiS+ZWO6J1i9K7CeljYYlY1x3OsLFnl0+sodVkFCEm59F2vb2+FpjkO0qdMiZknlyJT2vC2GAqDzvAP7IQfrsAckhLAC9Nu2eVifRRngXzXxk+lRctYHbMGxCznL1cG8cJjiivG85wOoasIMR5yO4UXakMY/PRHA6gbn9FXc3Av7KHZQap8MPHmnt08IiU6bokJ5FwYqbtJE4I+PNWJcgsBdeKnd2xA1kt8Bk/7WFwYhP5JoAReFjIYTkGGNIbhqBcD3ATeRXPvncT9VKyiUtWwiL02EAPpU03CnCfJlawDdmQTFB5dYvsfIb+j+lvQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=X+0w12oZdbhV960T8HqB6zptTXT0vzEbEfPf+5/egbs=; b=Iwff3E1mPDtZIgHiOYclZo3FTiA8BSrzWPSi2dq2Gwp5Vpnfu0Lvl+UyKoAn3/wFrE9p3/k5hjM0yuButX3wG6SpvLJIBvy2uQI7mgVcD7zq1Ef4k60ZfgKn2ftG0nK9mfGpLV5JPhF/2dMZxLrjBXE7VkAw26fKQUvb3LKL5P4Z31VgkM6rHLm83Lxrkgjq8MDUVSZSHFr5wSjNOy/umo7NScDfOYYfGv5XMiPVpUsFEOFfoFfdtfoam3UYQC9nVOhSkZvXuxJkUfcdISSmicANBup4x7syMWcRJ3YfYYG+9ycXjaDLVzPkApxPpstwsvWZy4qqNFkBqiwTgMSaBA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from DM4PR11MB5373.namprd11.prod.outlook.com (2603:10b6:5:394::7) by DM4PR11MB5550.namprd11.prod.outlook.com (2603:10b6:5:38b::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4888.9; Mon, 17 Jan 2022 23:24:22 +0000 Received: from DM4PR11MB5373.namprd11.prod.outlook.com ([fe80::fc15:bd26:128a:f5f5]) by DM4PR11MB5373.namprd11.prod.outlook.com ([fe80::fc15:bd26:128a:f5f5%8]) with mapi id 15.20.4888.014; Mon, 17 Jan 2022 23:24:22 +0000 From: =?utf-8?q?Micha=C5=82_Winiarski?= To: , Subject: [RFC 04/10] drm: test-drm_framebuffer: Convert to KUnit Date: Tue, 18 Jan 2022 00:22:53 +0100 Message-ID: <20220117232259.180459-5-michal.winiarski@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220117232259.180459-1-michal.winiarski@intel.com> References: <20220117232259.180459-1-michal.winiarski@intel.com> X-ClientProxiedBy: LO2P265CA0310.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:a5::34) To DM4PR11MB5373.namprd11.prod.outlook.com (2603:10b6:5:394::7) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 7ac34f83-9d29-44ee-cc29-08d9da107e5b X-MS-TrafficTypeDiagnostic: DM4PR11MB5550:EE_ X-LD-Processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:381; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: mGywa6Xq6oLHE1NwBCYhYAtMGzFUbt0liYVDTMxDyTwaDDohBmEUw1CAVT+jWqiBzJey2CD6drSXk4NfukSZCqAcwcBaMp9zSATI4wkSEc1rcUMgH4/sFJbbLR17w46Y7iexDTldQAR0hsSX1nd81EY1v6iasnQ8/dLeEOTkvixbXOhuo+sh5QdT3zKuux+sNK+hf7gflrxsD1Ap9lyUr9Nc1Cp0Jf5FezH7LSQhY7Egxyxsp6gx7a+DDXYAvH3y1ZA+IirdAA5YtbIwEebnBeaprr8/9PCs4w1+mCbVetvDdBLEphfWMTTxqdmSieGeI/OqpOH6OnfqA1P0VCFGtiZR9tcAvXaVJfU1iD3DvSJDYcNWEXkW+UcSFJ0+fP1lc71q6338t8bWwBg1zwdunCjFpLWq8qHBq3m+H/lFQAWvl/f5AICG0XkUfhdhqiB044Rqrwgu2zzqHl3yHBU3ZqCzlFBotMRCRdiadFjNSAivJeSe1lmxPokZ0JcaZ57fSTC/GytHOFS9HRxvxn7GJ7KHdILXT2MttBgbrStCNF+mhoVHwLyUc+kh+oNtpWfs+GtajyKne/gEz/6oNV8Wz43OTp2cVLuxNJxwZrQWGphBZuZbJXLOxcJRFQNcYrFrGGJUYOax0L3iMBagFOXsPw== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM4PR11MB5373.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(86362001)(82960400001)(4326008)(5660300002)(36756003)(186003)(6506007)(7416002)(1076003)(54906003)(6512007)(83380400001)(26005)(66946007)(66476007)(66556008)(316002)(6486002)(38100700002)(8936002)(508600001)(2906002)(6666004)(8676002)(2616005); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?FFP/1IU3vymFREFZ5J4XPaLd8sIS?= =?utf-8?q?5/9WKOlgSzPSE8gFTkxKH8nwyefo9T55j3+a1yDB9c4EMKv10mUBM+6Mtpvp+rpBT?= =?utf-8?q?ocDUkxyQlSpH1hlTkVzbuW9HtkEWqvCQ4iKGWvNmHoIdgu3rijyi2vaLShbNqfThJ?= =?utf-8?q?99xKq1mch2v3pvyCfPvXQjjCL6zKDATDUnBmQ62rJqRlA8ltlCv8qJbtLKO3uy2bi?= =?utf-8?q?LUVp1wmcudMcQoYmXEzi5bZMRcR14HM5lqWh/5l+XWYWSK+I1UBGPKL5l0mTcE1vH?= =?utf-8?q?krVPWJFeZR4lGWsyEfYPdAe/XiNQEGzY40ZBOsOXUqKesSKOQxsMitIXny5gH0Umy?= =?utf-8?q?K9tgYTiztesUlJyqmOymbVmOfcA5wp16jwq/sYXOQ0N9C8aqzWzO1+rKqd5PCOpMy?= =?utf-8?q?AMy+JLhiA5RkXio/96pASZesF77PLEpTaEW7EuNDsDXxm+4jMpHDPZBYnnI5egSKd?= =?utf-8?q?NfdrACcDiScLzuAQU1OWPtseVdPfbuvy/fC2r0OUktTAhAYADinuUqhQCawJ6fRko?= =?utf-8?q?sfdUm6ZEkBy+Udr1Umo4phGKIZSgurav53GQz/uo8V4BA7WL/4d0wiVp1iPwKmdj3?= =?utf-8?q?5jQuvkOBmshHx84lAHT3JJxhIbR5IYw83eQmXEL43iPvj/DSZ5d4d1qqRVJfhUhDy?= =?utf-8?q?24RV/CZuX8z9VdRyImnb4W0pBvXszrZ0eXtbeOhkl/y52AUZHSOTuW4TWKTHF++aZ?= =?utf-8?q?kbu26jF3oHfwjEnqrg2xNmGVQ+nz2aUVpjR+XT5J5HPwQlkaKxDjdj0GnFfPeENNQ?= =?utf-8?q?4c8p/jMADLIcoeGx5Z2VBgnBsVykcYQW9Hm8zeRh8NPIgxDaBxJF8T1L2PmGWJf0Q?= =?utf-8?q?fy7wGZ5he9LMNlI17fTLHuG68bk/a6VAgYGG3VhV/Vfn9h5+DjiPBmuL87gkcLdeP?= =?utf-8?q?t0mku1xhq8nfk6m2dRQMGNcrVO7FfJZZO6EfXKY2bKpzeBcjN5z+ziRYFKONY099f?= =?utf-8?q?dorcYO+dLrm3IueMfbOCWPcUoc+5FzC/rMmw6HXPzhnvzxVc5YLNmtBG16vCczA26?= =?utf-8?q?wLBZzp23sa9oqZOT8fWCr+wQoK4N4Atijtp/bjlWRjhAb5xp+EFBj7t61ZPODiaO4?= =?utf-8?q?GCJYR1tsNNwwvr0/wrb4yCgDdzBwuvd7NIkbhyqaGRNW5WVUOaREOEkLCiAsqOW52?= =?utf-8?q?X3/DQ3BrGYbDfSQIsP/iRt8cvMnaO6G479uT9U2niEx+BDdYOqFaCy8JnVXQYL1Tz?= =?utf-8?q?yzopsLSUn+vrlSJ+u4z+wNsu0oGFtOINR1o8uwJHRPKF9wfXbwsHGmanCxlyvUWMn?= =?utf-8?q?AQ532A2THNTLqeiCRqNjqdiCI+jrkviDPr1KYcri6yd7puioyWjIRkyibiRVe4C6S?= =?utf-8?q?WoSGsm7P0nEe41Li4iXC8POpKGiNWI8x18Lpr0omBk+8/xMeMYQenEGCUL/ghAWAY?= =?utf-8?q?he11s57f21DaQAxQ1ddHBPYsZZzEEdQ2SQEk6ewc3yaDJGm3bf/7fAdWrmSOt8uTb?= =?utf-8?q?pKGmXvW5cQ2KkT14lpct1ITZewQz5bmceweHgpPAF0CIhFWM6wmjZDUL6JR5VEOyG?= =?utf-8?q?Cqcb9nKJZZMlFFC5whcDs6iKLNQ5JbrlKK4ltlXWmX5BQo1AHO0N5gLdB2fc11Mjv?= =?utf-8?q?KT8pwayOaFlON6zsW8nhvFdslptH8zMaA=3D=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: 7ac34f83-9d29-44ee-cc29-08d9da107e5b X-MS-Exchange-CrossTenant-AuthSource: DM4PR11MB5373.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Jan 2022 23:24:22.5318 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: epdm6xJikI54BwTdZLdyQzokKsPOXjBUiENGvyopAn/4Kf/rKe5NdIs5rN6uYt3QpRXAn4inHhH6ohZA8beIJx+OwF1kNaZI4/WqknERXnA= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR11MB5550 X-OriginatorOrg: intel.com X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Micha=C5=82_Winiarski?= , Thomas Zimmermann , David Airlie , Brendan Higgins , Daniel Latypov , Arkadiusz Hiler , Petri Latvala Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Mocking was moved to .init() in order to separate it from test logic. No functional changes. Signed-off-by: MichaƂ Winiarski --- drivers/gpu/drm/selftests/Makefile | 3 +- .../gpu/drm/selftests/drm_modeset_selftests.h | 1 - .../gpu/drm/selftests/test-drm_framebuffer.c | 109 +++++++++++------- .../drm/selftests/test-drm_modeset_common.h | 1 - 4 files changed, 68 insertions(+), 46 deletions(-) diff --git a/drivers/gpu/drm/selftests/Makefile b/drivers/gpu/drm/selftests/Makefile index 76c127613d1a..1235eadca884 100644 --- a/drivers/gpu/drm/selftests/Makefile +++ b/drivers/gpu/drm/selftests/Makefile @@ -1,7 +1,6 @@ # SPDX-License-Identifier: GPL-2.0-only test-drm_modeset-$(CONFIG_DRM_DEBUG_SELFTEST) := \ test-drm_modeset_common.o \ - test-drm_framebuffer.o \ test-drm_damage_helper.o test-drm_dp_mst_helper.o \ test-drm_rect.o @@ -9,4 +8,4 @@ obj-$(CONFIG_DRM_DEBUG_SELFTEST) += test-drm_mm.o test-drm_modeset.o obj-$(CONFIG_DRM_KUNIT_TEST) := \ test-drm_cmdline_parser.o test-drm_plane_helper.o \ - test-drm_format.o + test-drm_format.o test-drm_framebuffer.o diff --git a/drivers/gpu/drm/selftests/drm_modeset_selftests.h b/drivers/gpu/drm/selftests/drm_modeset_selftests.h index 5f253d9e573c..66f6b31e1a7f 100644 --- a/drivers/gpu/drm/selftests/drm_modeset_selftests.h +++ b/drivers/gpu/drm/selftests/drm_modeset_selftests.h @@ -10,7 +10,6 @@ selftest(drm_rect_clip_scaled_div_by_zero, igt_drm_rect_clip_scaled_div_by_zero) selftest(drm_rect_clip_scaled_not_clipped, igt_drm_rect_clip_scaled_not_clipped) selftest(drm_rect_clip_scaled_clipped, igt_drm_rect_clip_scaled_clipped) selftest(drm_rect_clip_scaled_signed_vs_unsigned, igt_drm_rect_clip_scaled_signed_vs_unsigned) -selftest(check_drm_framebuffer_create, igt_check_drm_framebuffer_create) selftest(damage_iter_no_damage, igt_damage_iter_no_damage) selftest(damage_iter_no_damage_fractional_src, igt_damage_iter_no_damage_fractional_src) selftest(damage_iter_no_damage_src_moved, igt_damage_iter_no_damage_src_moved) diff --git a/drivers/gpu/drm/selftests/test-drm_framebuffer.c b/drivers/gpu/drm/selftests/test-drm_framebuffer.c index 61b44d3a6a61..faa01cefe4e5 100644 --- a/drivers/gpu/drm/selftests/test-drm_framebuffer.c +++ b/drivers/gpu/drm/selftests/test-drm_framebuffer.c @@ -3,6 +3,7 @@ * Test cases for the drm_framebuffer functions */ +#include #include #include @@ -12,20 +13,67 @@ #include "../drm_crtc_internal.h" -#include "test-drm_modeset_common.h" - #define MIN_WIDTH 4 #define MAX_WIDTH 4096 #define MIN_HEIGHT 4 #define MAX_HEIGHT 4096 -struct drm_framebuffer_test { +static struct drm_framebuffer *fb_create_mock(struct drm_device *dev, + struct drm_file *file_priv, + const struct drm_mode_fb_cmd2 *mode_cmd) +{ + int *buffer_created = dev->dev_private; + + *buffer_created = 1; + + return ERR_PTR(-EINVAL); +} + +static const struct drm_mode_config_funcs mock_config_funcs = { + .fb_create = fb_create_mock, +}; + +static int drm_framebuffer_test_init(struct kunit *test) +{ + struct drm_device *mock; + + mock = kunit_kzalloc(test, sizeof(*mock), GFP_KERNEL); + KUNIT_ASSERT_NOT_ERR_OR_NULL(test, mock); + + mock->mode_config = (struct drm_mode_config) { + .min_width = MIN_WIDTH, + .max_width = MAX_WIDTH, + .min_height = MIN_HEIGHT, + .max_height = MAX_HEIGHT, + .allow_fb_modifiers = true, + .funcs = &mock_config_funcs, + }; + + test->priv = mock; + + return 0; +} + +struct drm_framebuffer_create_test { int buffer_created; struct drm_mode_fb_cmd2 cmd; const char *name; }; -static struct drm_framebuffer_test createbuffer_tests[] = { +static void test_drm_framebuffer_create(struct kunit *test) +{ + const struct drm_framebuffer_create_test *params = test->param_value; + struct drm_device *mock = test->priv; + int buffer_created = 0; + + mock->dev_private = &buffer_created; + + drm_internal_framebuffer_create(mock, ¶ms->cmd, NULL); + + KUNIT_EXPECT_EQ(test, buffer_created, params->buffer_created); +} + +static const struct drm_framebuffer_create_test drm_framebuffer_create_tests[] = { { .buffer_created = 1, .name = "ABGR8888 normal sizes", .cmd = { .width = 600, .height = 600, .pixel_format = DRM_FORMAT_ABGR8888, .handles = { 1, 0, 0 }, .pitches = { 4 * 600, 0, 0 }, @@ -304,48 +352,25 @@ static struct drm_framebuffer_test createbuffer_tests[] = { }, }; -static struct drm_framebuffer *fb_create_mock(struct drm_device *dev, - struct drm_file *file_priv, - const struct drm_mode_fb_cmd2 *mode_cmd) +static void drm_framebuffer_create_desc(const struct drm_framebuffer_create_test *t, + char *desc) { - int *buffer_created = dev->dev_private; - *buffer_created = 1; - return ERR_PTR(-EINVAL); + sprintf(desc, "%s", t->name); } -static struct drm_mode_config_funcs mock_config_funcs = { - .fb_create = fb_create_mock, -}; +KUNIT_ARRAY_PARAM(drm_framebuffer_create, + drm_framebuffer_create_tests, + drm_framebuffer_create_desc); -static struct drm_device mock_drm_device = { - .mode_config = { - .min_width = MIN_WIDTH, - .max_width = MAX_WIDTH, - .min_height = MIN_HEIGHT, - .max_height = MAX_HEIGHT, - .allow_fb_modifiers = true, - .funcs = &mock_config_funcs, - }, +static struct kunit_case drm_framebuffer_tests[] = { + KUNIT_CASE_PARAM(test_drm_framebuffer_create, drm_framebuffer_create_gen_params), + {} }; -static int execute_drm_mode_fb_cmd2(struct drm_mode_fb_cmd2 *r) -{ - int buffer_created = 0; - - mock_drm_device.dev_private = &buffer_created; - drm_internal_framebuffer_create(&mock_drm_device, r, NULL); - return buffer_created; -} - -int igt_check_drm_framebuffer_create(void *ignored) -{ - int i = 0; - - for (i = 0; i < ARRAY_SIZE(createbuffer_tests); i++) { - FAIL(createbuffer_tests[i].buffer_created != - execute_drm_mode_fb_cmd2(&createbuffer_tests[i].cmd), - "Test %d: \"%s\" failed\n", i, createbuffer_tests[i].name); - } +static struct kunit_suite drm_framebuffer_test_suite = { + .name = "drm_framebuffer_tests", + .init = drm_framebuffer_test_init, + .test_cases = drm_framebuffer_tests, +}; - return 0; -} +kunit_test_suite(drm_framebuffer_test_suite); diff --git a/drivers/gpu/drm/selftests/test-drm_modeset_common.h b/drivers/gpu/drm/selftests/test-drm_modeset_common.h index f6cfce2a5863..c09f38b791ad 100644 --- a/drivers/gpu/drm/selftests/test-drm_modeset_common.h +++ b/drivers/gpu/drm/selftests/test-drm_modeset_common.h @@ -20,7 +20,6 @@ int igt_drm_rect_clip_scaled_div_by_zero(void *ignored); int igt_drm_rect_clip_scaled_not_clipped(void *ignored); int igt_drm_rect_clip_scaled_clipped(void *ignored); int igt_drm_rect_clip_scaled_signed_vs_unsigned(void *ignored); -int igt_check_drm_framebuffer_create(void *ignored); int igt_damage_iter_no_damage(void *ignored); int igt_damage_iter_no_damage_fractional_src(void *ignored); int igt_damage_iter_no_damage_src_moved(void *ignored);