Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Senna Tschudin <peter.senna@linux.intel.com>
To: Pravalika Gurram <pravalika.gurram@intel.com>,
	igt-dev@lists.freedesktop.org
Subject: Re: [PATCH v1] tests/intel/xe_debugfs: Extend gt test to check few debugfs entries
Date: Wed, 18 Dec 2024 09:56:22 +0100	[thread overview]
Message-ID: <55894817-9c88-4e95-b648-72e3f031e10c@linux.intel.com> (raw)
In-Reply-To: <20241217135659.673564-1-pravalika.gurram@intel.com>

Hi Pravalika,

Please see my comment below.

On 17.12.2024 14:56, Pravalika Gurram wrote:
> Read and dump  below debugfs entries.
> ggtt
> register-save-restore
> workarounds
> default_lrc_rcs
> default_lrc_ccs
> default_lrc_bcs
> default_lrc_vcs
> default_lrc_vecs
> hwconfig"
> 
> Signed-off-by: Pravalika Gurram <pravalika.gurram@intel.com>
> ---
>  tests/intel/xe_debugfs.c | 46 ++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 46 insertions(+)
> 
> diff --git a/tests/intel/xe_debugfs.c b/tests/intel/xe_debugfs.c
> index 700575031..bcbb5036a 100644
> --- a/tests/intel/xe_debugfs.c
> +++ b/tests/intel/xe_debugfs.c
> @@ -162,6 +162,16 @@ test_gt(int fd, int gt_id)
>  		"pat",
>  		"mocs",
>  //		"force_reset"
> +		"ggtt",
> +		"register-save-restore",
> +		"workarounds",
> +		"default_lrc_rcs",
> +		"default_lrc_ccs",
> +		"default_lrc_bcs",
> +		"default_lrc_vcs",
> +		"default_lrc_vecs",
> +		"hwconfig"
> +
>  	};
>  	static const char * const expected_files_uc[] = {
>  		"huc_info",
> @@ -194,6 +204,42 @@ 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/ggtt", gt_id);
> +	igt_assert(igt_debugfs_exists(fd, name, O_RDONLY));
> +	igt_debugfs_dump(fd, name);
> +
> +	sprintf(name, "gt%d/register-save-restore", gt_id);
> +	igt_assert(igt_debugfs_exists(fd, name, O_RDONLY));
> +	igt_debugfs_dump(fd, name);
> +
> +	sprintf(name, "gt%d/workarounds", gt_id);
> +	igt_assert(igt_debugfs_exists(fd, name, O_RDONLY));
> +	igt_debugfs_dump(fd, name);
> +
> +	sprintf(name, "gt%d/default_lrc_rcs", gt_id);
> +	igt_assert(igt_debugfs_exists(fd, name, O_RDONLY));
> +	igt_debugfs_dump(fd, name);
> +
> +	sprintf(name, "gt%d/default_lrc_ccs", gt_id);
> +	igt_assert(igt_debugfs_exists(fd, name, O_RDONLY));
> +	igt_debugfs_dump(fd, name);
> +
> +	sprintf(name, "gt%d/default_lrc_bcs", gt_id);
> +	igt_assert(igt_debugfs_exists(fd, name, O_RDONLY));
> +	igt_debugfs_dump(fd, name);
> +
> +	sprintf(name, "gt%d/default_lrc_vecs", gt_id);
> +	igt_assert(igt_debugfs_exists(fd, name, O_RDONLY));
> +	igt_debugfs_dump(fd, name);
> +
> +	sprintf(name, "gt%d/default_lrc_vcs", gt_id);
> +	igt_assert(igt_debugfs_exists(fd, name, O_RDONLY));
> +	igt_debugfs_dump(fd, name);
> +
> +	sprintf(name, "gt%d/hwconfig", gt_id);
> +	igt_assert(igt_debugfs_exists(fd, name, O_RDONLY));
> +	igt_debugfs_dump(fd, name);
> +

Would something like the following work and clean up the code a bit?

	for (int i = 0; i < ARRAY_SIZE(expected_files); i++) {
		sprintf(name, "gt%d/%s", gt_id, expected_files[i]);
		igt_assert(igt_debugfs_exists(fd, name, O_RDONLY));
		igt_debugfs_dump(fd, name);
	}

  reply	other threads:[~2024-12-18  8:56 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-17 13:56 [PATCH v1] tests/intel/xe_debugfs: Extend gt test to check few debugfs entries Pravalika Gurram
2024-12-18  8:56 ` Peter Senna Tschudin [this message]
2024-12-18  9:36   ` Peter Senna Tschudin
2024-12-18 10:11     ` Gurram, Pravalika
2024-12-18 11:57       ` Gurram, Pravalika
2024-12-18 14:32         ` Peter Senna Tschudin
2024-12-19  3:57           ` Matthew Brost
2024-12-18 13:16 ` ✓ i915.CI.BAT: success for " Patchwork
2024-12-18 14:15 ` ✓ Xe.CI.BAT: " Patchwork
2024-12-18 20:38 ` ✗ i915.CI.Full: failure " Patchwork
2024-12-20  9:17   ` Gurram, Pravalika
2024-12-19  0:29 ` ✗ Xe.CI.Full: " Patchwork
2024-12-20  9:25   ` Gurram, Pravalika
2024-12-20  9:30   ` Gurram, Pravalika
2024-12-19  3:48 ` [PATCH v1] " Matthew Brost

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=55894817-9c88-4e95-b648-72e3f031e10c@linux.intel.com \
    --to=peter.senna@linux.intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=pravalika.gurram@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