From: "Dixit, Ashutosh" <ashutosh.dixit@intel.com>
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
Date: Fri, 02 Aug 2024 16:12:59 -0700 [thread overview]
Message-ID: <87zfpu4iys.wl-ashutosh.dixit@intel.com> (raw)
In-Reply-To: <20240801195129.3667206-2-John.C.Harrison@Intel.com>
On Thu, 01 Aug 2024 12:51:28 -0700, John.C.Harrison@Intel.com wrote:
>
> From: John Harrison <John.C.Harrison@Intel.com>
>
> 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 <ashutosh.dixit@intel.com>
>
> Signed-off-by: John Harrison <John.C.Harrison@Intel.com>
> ---
> 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
>
next prev parent reply other threads:[~2024-08-02 23:13 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-01 19:51 [PATCH i-g-t 0/2] Update hwconfig table tests John.C.Harrison
2024-08-01 19:51 ` [PATCH i-g-t 1/2] tests/intel/xe_query: Fail on unknown hwconfig entries John.C.Harrison
2024-08-02 23:12 ` Dixit, Ashutosh [this message]
2024-08-01 19:51 ` [PATCH i-g-t 2/2] tests/intel/*_query: Add support for new hwconfig table entry John.C.Harrison
2024-08-02 23:14 ` Dixit, Ashutosh
2024-08-01 20:26 ` ✓ CI.xeBAT: success for Update hwconfig table tests Patchwork
2024-08-01 20:50 ` ✗ Fi.CI.BAT: failure " Patchwork
2024-08-05 11:24 ` Kamil Konieczny
2024-08-01 22:32 ` ✗ CI.xeFULL: " Patchwork
2024-08-05 11:33 ` Kamil Konieczny
2024-08-06 20:28 ` [PATCH i-g-t 0/2] " Dixit, Ashutosh
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87zfpu4iys.wl-ashutosh.dixit@intel.com \
--to=ashutosh.dixit@intel.com \
--cc=IGT-Dev@Lists.FreeDesktop.Org \
--cc=John.C.Harrison@Intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox