[PATCH v2] tests/intel/xe_debugfs: Extend gt test to check few debugfs entries
Gurram, Pravalika
pravalika.gurram at intel.com
Thu Jan 9 10:46:54 UTC 2025
> -----Original Message-----
> From: De Marchi, Lucas <lucas.demarchi at intel.com>
> Sent: Thursday, December 19, 2024 8:16 PM
> To: Gurram, Pravalika <pravalika.gurram at intel.com>
> Cc: igt-dev at lists.freedesktop.org; peter.senna at linux.intel.com; Brost,
> Matthew <matthew.brost at intel.com>
> Subject: Re: [PATCH v2] tests/intel/xe_debugfs: Extend gt test to check few
> debugfs entries
>
> On Thu, Dec 19, 2024 at 09:26:09AM +0530, 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
> >
> >Reviewed-by: Matthew Brost <matthew.brost at intel.com>
> >Signed-off-by: Pravalika Gurram <pravalika.gurram at intel.com>
> >---
> > tests/intel/xe_debugfs.c | 50 ++++++++++++----------------------------
> > 1 file changed, 15 insertions(+), 35 deletions(-)
> >
> >diff --git a/tests/intel/xe_debugfs.c b/tests/intel/xe_debugfs.c index
> >700575031..a31de41a4 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",
> >@@ -170,41 +180,11 @@ test_gt(int fd, int gt_id)
> > // "guc_ct_selftest"
> > };
> >
> >- sprintf(name, "gt%d/hw_engines", gt_id);
> >- igt_assert(igt_debugfs_exists(fd, name, O_RDONLY));
> >- igt_debugfs_dump(fd, name);
> >-
> >- sprintf(name, "gt%d/sa_info", gt_id);
> >- igt_assert(igt_debugfs_exists(fd, name, O_RDONLY));
> >- igt_debugfs_dump(fd, name);
> >-
> >- sprintf(name, "gt%d/steering", gt_id);
> >- igt_assert(igt_debugfs_exists(fd, name, O_RDONLY));
> >- igt_debugfs_dump(fd, name);
> >-
> >- sprintf(name, "gt%d/topology", gt_id);
> >- igt_assert(igt_debugfs_exists(fd, name, O_RDONLY));
> >- igt_debugfs_dump(fd, name);
> >-
> >- sprintf(name, "gt%d/pat", 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);
> >-
> >- sprintf(name, "gt%d/uc/guc_info", gt_id);
> >- igt_assert(igt_debugfs_exists(fd, name, O_RDONLY));
> >- igt_debugfs_dump(fd, name);
> >-
> >- sprintf(name, "gt%d/uc/huc_info", gt_id);
> >- igt_assert(igt_debugfs_exists(fd, name, O_RDONLY));
> >- igt_debugfs_dump(fd, name);
>
> these last 3 would be dropped from the dump. I don't think that's intentional, is
> it?
>
> Ideally this would be more than 1 patch:
> 1) replace the copy and paste with the loop
> 2) add more files to be dumped
>
> Also, it seems we are not actually running this "test" as part of BAT. I think that
> more than actually checking the asserts this would be useful to check the state
> of the hardware in the beginning of a BAT execution.
>
> Lucas De Marchi
>
This test is already part of BAT
igt-gpu-tools$ cat tests/intel-ci/xe-fast-feedback.testlist | grep debugfs
igt at xe_debugfs@base
igt at xe_debugfs@gt
igt at xe_debugfs@forcewake
-- Pravalika
> >-
> >- sprintf(name, "gt%d/uc/guc_log", gt_id);
> >- igt_assert(igt_debugfs_exists(fd, name, O_RDONLY));
> >- igt_debugfs_dump(fd, name);
> >+ 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);
> >+ }
> >
> > sprintf(name, "/gt%d", gt_id);
> > validate_entries(fd, name, expected_files,
> >ARRAY_SIZE(expected_files));
> >--
> >2.34.1
> >
More information about the igt-dev
mailing list