[PATCH i-g-t 1/2] tests/intel/xe_debugfs: Extend gt test to check mocs entry

Matt Roper matthew.d.roper at intel.com
Fri Mar 22 21:18:26 UTC 2024


On Thu, Mar 21, 2024 at 08:46:36PM +0530, janga.rahul.kumar at intel.com wrote:
> From: Janga Rahul Kumar <janga.rahul.kumar at intel.com>
> 
> Read and dump mocs debugfs entry.
> 
> Cc: Matt Roper <matthew.d.roper at intel.com>
> Signed-off-by: Janga Rahul Kumar <janga.rahul.kumar at intel.com>
> ---
>  tests/intel/xe_debugfs.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/tests/intel/xe_debugfs.c b/tests/intel/xe_debugfs.c
> index c5a586e9b..ba12f6ccc 100644
> --- a/tests/intel/xe_debugfs.c
> +++ b/tests/intel/xe_debugfs.c
> @@ -158,6 +158,7 @@ test_gt(int fd, int gt_id)
>  		"topology",
>  		"sa_info",
>  		"hw_engines",
> +		"mocs",
>  //		"force_reset"
>  	};
>  	static const char * const expected_files_uc[] = {
> @@ -183,6 +184,10 @@ test_gt(int fd, int gt_id)
>  	igt_assert(igt_debugfs_exists(fd, name, O_RDONLY));
>  	igt_debugfs_dump(fd, name);
>  
> +	sprintf(name, "gt%d/mocs", gt_id);
> +	igt_assert(igt_debugfs_exists(fd, name, O_RDONLY));
> +	igt_debugfs_dump(fd, name);

Rather than just dumping the contents to the log should we do some very
basic sanity checks (e.g., make sure that the values don't come back as
all 0's for every entry)?


Matt

> +
>  	sprintf(name, "gt%d/uc/guc_info", gt_id);
>  	igt_assert(igt_debugfs_exists(fd, name, O_RDONLY));
>  	igt_debugfs_dump(fd, name);
> -- 
> 2.25.1
> 

-- 
Matt Roper
Graphics Software Engineer
Linux GPU Platform Enablement
Intel Corporation


More information about the igt-dev mailing list