[PATCH v1] tests/intel/xe_debugfs: Extend gt test to check few debugfs entries
Peter Senna Tschudin
peter.senna at linux.intel.com
Wed Dec 18 08:56:22 UTC 2024
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 at 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);
}
More information about the igt-dev
mailing list