From mboxrd@z Thu Jan 1 00:00:00 1970 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 E5C0DC3DA7F for ; Fri, 2 Aug 2024 23:13:04 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6F52710E029; Fri, 2 Aug 2024 23:13:04 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="P/+39KZC"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.13]) by gabe.freedesktop.org (Postfix) with ESMTPS id 74D9F10E029 for ; Fri, 2 Aug 2024 23:13:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1722640383; x=1754176383; h=date:message-id:from:to:cc:subject:in-reply-to: references:mime-version; bh=6XEXrcN4Nq1lc5xnYaz5NSKFTOa3H1Sc8SyV7gyq5qQ=; b=P/+39KZCrD78rEDA/QJY+bJyomMY5inDbKaI2aKL0XSwtPLb0zP5ONG8 Wv/NpnksZSDXO/lYExTWwFdUlVm5fsVd/eHfJcISnZc/1LOAbcZfcBQwH ATxjn4JF0yfd3aK1sI78TAseatyczE05FAg1G04vNWQdDsJOKa3bEflxz MPKNhzoHKnwDN1Msa7p+BEPH8YylBzwYQ3mmEZT2CwGnGT9YnCcuJwLC9 kY8XyfAgewHbv3gGofgmaFJVSMMi8cqLQK/ODU0Ed5oxCK0waxgA1rbmc 52LH0ugqyUZOeNxZSIapnmMiShk/reTeJSUgjAKtkj14SPPa/n8Jyqk2G A==; X-CSE-ConnectionGUID: 3s3LJE/hR2aM7T8BPhTqGA== X-CSE-MsgGUID: 0fab7mktR0qR46/CfEv7bg== X-IronPort-AV: E=McAfee;i="6700,10204,11152"; a="23592693" X-IronPort-AV: E=Sophos;i="6.09,259,1716274800"; d="scan'208";a="23592693" Received: from fmviesa008.fm.intel.com ([10.60.135.148]) by fmvoesa107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Aug 2024 16:13:03 -0700 X-CSE-ConnectionGUID: /JLMndGLQ+aOgOWHXQPfEg== X-CSE-MsgGUID: pkmL0+uvREysdf0X43TFsg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.09,259,1716274800"; d="scan'208";a="55499307" Received: from coles-mobl1.amr.corp.intel.com (HELO adixit-arch.intel.com) ([10.246.112.252]) by fmviesa008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Aug 2024 16:13:02 -0700 Date: Fri, 02 Aug 2024 16:12:59 -0700 Message-ID: <87zfpu4iys.wl-ashutosh.dixit@intel.com> From: "Dixit, Ashutosh" To: John.C.Harrison@Intel.com Cc: IGT-Dev@Lists.FreeDesktop.Org Subject: Re: [PATCH i-g-t 1/2] tests/intel/xe_query: Fail on unknown hwconfig entries In-Reply-To: <20240801195129.3667206-2-John.C.Harrison@Intel.com> References: <20240801195129.3667206-1-John.C.Harrison@Intel.com> <20240801195129.3667206-2-John.C.Harrison@Intel.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?ISO-8859-4?Q?Goj=F2?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/29.4 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-BeenThere: igt-dev@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development mailing list for IGT GPU Tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: igt-dev-bounces@lists.freedesktop.org Sender: "igt-dev" On Thu, 01 Aug 2024 12:51:28 -0700, John.C.Harrison@Intel.com wrote: > > From: John Harrison > > There is a test that the hwconfig table is valid. However, if there > was an unknown entry (corrupted table or out of date test) all it did > was print a debug message of "please fix"! So the test would still > pass and CI would not notice the problem. > > Add in some actual asserts that the enum value is within the valid > range and that it is not missing from the switch statement. Reviewed-by: Ashutosh Dixit > > Signed-off-by: John Harrison > --- > tests/intel/xe_query.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/tests/intel/xe_query.c b/tests/intel/xe_query.c > index c6d88b258fb3..6ebf5e4b6d71 100644 > --- a/tests/intel/xe_query.c > +++ b/tests/intel/xe_query.c > @@ -137,7 +137,8 @@ const char* get_hwconfig_name(int param) > CASE_STRINGIFY(MIN_MESH_URB_ENTRIES); > CASE_STRINGIFY(MAX_MESH_URB_ENTRIES); > } > - return "?? Please fix "__FILE__; > + igt_assert_lt(param, __INTEL_HWCONFIG_KEY_LIMIT); > + igt_assert(!"Missing config table enum"); > } > #undef CASE_STRINGIFY > > -- > 2.45.2 >