From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by gabe.freedesktop.org (Postfix) with ESMTPS id 435EC10E439 for ; Fri, 17 Feb 2023 08:18:12 +0000 (UTC) From: Swati Sharma To: igt-dev@lists.freedesktop.org Date: Fri, 17 Feb 2023 13:50:15 +0530 Message-Id: <20230217082017.27753-2-swati2.sharma@intel.com> In-Reply-To: <20230217082017.27753-1-swati2.sharma@intel.com> References: <20230217082017.27753-1-swati2.sharma@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [igt-dev] [PATCH i-g-t v2 1/3] tests/kms_plane_scaling: Prep work List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: igt-dev-bounces@lists.freedesktop.org Sender: "igt-dev" List-ID: struct can be reused to add more test cases. v2: -don't declare list of lists[JP] Signed-off-by: Swati Sharma --- tests/kms_plane_scaling.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/tests/kms_plane_scaling.c b/tests/kms_plane_scaling.c index 74554915f..ecb4087f4 100644 --- a/tests/kms_plane_scaling.c +++ b/tests/kms_plane_scaling.c @@ -43,6 +43,15 @@ typedef struct { bool extended; } data_t; +struct invalid_paramtests { + const char *testname; + uint32_t planesize[2]; + struct { + enum igt_atomic_plane_properties prop; + uint32_t value; + } params[8]; +}; + const struct { const char * const describe; const char * const name; @@ -901,14 +910,7 @@ static void invalid_parameter_tests(data_t *d) igt_plane_t *plane; int rval; - const struct { - const char *testname; - uint32_t planesize[2]; - struct { - enum igt_atomic_plane_properties prop; - uint32_t value; - } params[8]; - } paramtests[] = { + static const struct invalid_paramtests paramtests[] = { { .testname = "less-than-1-height-src", .planesize = {256, 8}, -- 2.25.1