* [PATCH i-g-t v3] tests/xe_debugfs: add uc debugfs validation and read tests
@ 2026-07-17 7:52 Sobin Thomas
2026-07-17 9:04 ` ✓ Xe.CI.BAT: success for " Patchwork
2026-07-17 9:04 ` ✓ i915.CI.BAT: " Patchwork
0 siblings, 2 replies; 3+ messages in thread
From: Sobin Thomas @ 2026-07-17 7:52 UTC (permalink / raw)
To: igt-dev, daniele.ceraolospurio
Add coverage for GT-specific debugfs entries by introducing a new
gt-dir subtest that validates the presence of required files in the
GT debugfs hierarchy. The test currently verifies the existence of
the following debugfs nodes:
- uc/gsc_info
- uc/huc_info
- uc/guc_info
- uc/guc_pc
These additions improve validation of Xe GT debugfs interfaces and
provide basic functional coverage for the GSC information debugfs node.
v2: Add support for guc and huc info (Daniele)
v3: Added checks for the device nodes.
Signed-off-by: Sobin Thomas <sobin.thomas@intel.com>
---
tests/intel/xe_debugfs.c | 120 ++++++++++++++++++++++++++++++++++++++-
1 file changed, 119 insertions(+), 1 deletion(-)
diff --git a/tests/intel/xe_debugfs.c b/tests/intel/xe_debugfs.c
index da482157e..e7d89ec9d 100644
--- a/tests/intel/xe_debugfs.c
+++ b/tests/intel/xe_debugfs.c
@@ -451,6 +451,32 @@ skip:
igt_skip("Failed to open debugfs directory\n");
}
+/**
+ * SUBTEST: gt-dir
+ * Description: Check required debugfs devnodes exist in the GT debugfs directory
+ */
+static void test_gt_dir(struct xe_device *xe_dev, unsigned int gt)
+{
+ const struct check_entry expected_files[] = {
+ { "uc/gsc_info", O_RDONLY },
+ { "uc/huc_info", O_RDONLY },
+ { "uc/guc_info", O_RDONLY },
+ { "uc/guc_pc", O_RDONLY },
+ };
+ int debugfs_fd = igt_debugfs_gt_dir(xe_dev->fd, gt);
+ int missing_count;
+
+ igt_skip_on_f(debugfs_fd < 0, "Failed to open debugfs directory\n");
+
+ missing_count = debugfs_validate_entries(xe_dev, debugfs_fd, expected_files,
+ ARRAY_SIZE(expected_files));
+
+ close(debugfs_fd);
+
+ igt_fail_on_f(missing_count > 0, "Found %d missing debugfs files (see warnings above)\n",
+ missing_count);
+}
+
/**
* SUBTEST: tile-dir
* Description: Check required debugfs devnodes exist in the tile debugfs directory
@@ -595,6 +621,71 @@ static void check_gt_reg_sr(int fd, int gt)
igt_assert_eq(problems, 0);
}
+static void test_uc_info_read(struct xe_device *xe_dev, unsigned int gt, const char *node,
+ bool mandatory)
+{
+ int debugfs_fd = igt_debugfs_gt_dir(xe_dev->fd, gt);
+ char *buf;
+
+ debugfs_fd = igt_debugfs_gt_dir(xe_dev->fd, gt);
+ igt_skip_on_f(debugfs_fd < 0, "Failed to open debugfs directory\n");
+
+ if (faccessat(debugfs_fd, node, F_OK, 0) < 0) {
+ close(debugfs_fd);
+ igt_fail_on_f(mandatory,
+ "Mandatory debugfs node %s is missing on GT-%u\n",
+ node, gt);
+
+ igt_skip("%s debugfs node not present on GT-%u\n",
+ node, gt);
+ }
+ buf = igt_sysfs_get(debugfs_fd, node);
+
+ igt_info("Successfully read %s: %zu bytes\n%s\n", node, strlen(buf), buf);
+
+ close(debugfs_fd);
+ igt_assert_f(buf, "Failed to read %s debugfs file\n", node);
+ igt_assert_f(buf[0] != '\0', "%s debugfs file is empty\n", node);
+ free(buf);
+}
+
+/**
+ * SUBTEST: gsc-info-read
+ * Description: Check GSC info debugfs devnode contents
+ */
+static void test_gsc_info_read(struct xe_device *xe_dev, unsigned int gt)
+{
+ test_uc_info_read(xe_dev, gt, "uc/gsc_info", false);
+}
+
+/**
+ * SUBTEST: huc-info-read
+ * Description: Check HUC info debugfs devnode contents
+ */
+static void test_huc_info_read(struct xe_device *xe_dev, unsigned int gt)
+{
+ test_uc_info_read(xe_dev, gt, "uc/huc_info", false);
+}
+
+/**
+ * SUBTEST: guc-pc-read
+ * Description: Read the guc pc info from the debugfs node contents
+ */
+
+static void test_guc_pc_info(struct xe_device *xe_dev, unsigned int gt)
+{
+ test_uc_info_read(xe_dev, gt, "uc/guc_pc", true);
+}
+
+/**
+ * SUBTEST: guc-info-read
+ * Description: Check GUC info debugfs devnode contents
+ */
+static void test_guc_info_read(struct xe_device *xe_dev, unsigned int gt)
+{
+ test_uc_info_read(xe_dev, gt, "uc/guc_info", true);
+}
+
const char *help_str =
" --warn-not-hit|--w\tWarn about devfs nodes that have no tests";
@@ -619,8 +710,9 @@ static int opt_handler(int option, int option_index, void *input)
int igt_main_args("", long_options, help_str, opt_handler, NULL)
{
struct xe_device *xe_dev;
+ unsigned int gt;
unsigned int t;
- int fd = -1, gt;
+ int fd = -1;
igt_fixture() {
fd = drm_open_driver_master(DRIVER_XE);
@@ -633,6 +725,12 @@ int igt_main_args("", long_options, help_str, opt_handler, NULL)
igt_subtest("root-dir")
test_root_dir(xe_dev);
+ igt_describe("Check required debugfs devnodes exist in the GT debugfs directory.");
+ igt_subtest_with_dynamic("gt-dir")
+ xe_for_each_gt(fd, gt)
+ igt_dynamic_f("gt-%u", gt)
+ test_gt_dir(xe_dev, gt);
+
igt_describe("Check required debugfs devnodes exist in the tile debugfs directory.");
igt_subtest_with_dynamic("tile-dir")
xe_for_each_tile(fd, t)
@@ -648,6 +746,26 @@ int igt_main_args("", long_options, help_str, opt_handler, NULL)
igt_dynamic_f("gt%d", gt)
check_gt_reg_sr(fd, gt);
+ igt_describe("Check GSC info debugfs devnode contents.");
+ igt_subtest_with_dynamic("gsc-info-read")
+ xe_for_each_gt(fd, gt)
+ igt_dynamic_f("gt-%u", gt)
+ test_gsc_info_read(xe_dev, gt);
+ igt_describe("Read GuC information from debugfs.");
+ igt_subtest("guc-info-read")
+ xe_for_each_gt(fd, gt)
+ test_guc_info_read(xe_dev, gt);
+
+ igt_describe("Read HuC information from debugfs.");
+ igt_subtest("huc-info-read")
+ xe_for_each_gt(fd, gt)
+ test_huc_info_read(xe_dev, gt);
+
+ igt_describe("Read guc pc information from debugfs.");
+ igt_subtest("guc-pc-read")
+ xe_for_each_gt(fd, gt)
+ test_guc_pc_info(xe_dev, gt);
+
igt_fixture() {
drm_close_driver(fd);
}
--
2.52.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* ✓ Xe.CI.BAT: success for tests/xe_debugfs: add uc debugfs validation and read tests
2026-07-17 7:52 [PATCH i-g-t v3] tests/xe_debugfs: add uc debugfs validation and read tests Sobin Thomas
@ 2026-07-17 9:04 ` Patchwork
2026-07-17 9:04 ` ✓ i915.CI.BAT: " Patchwork
1 sibling, 0 replies; 3+ messages in thread
From: Patchwork @ 2026-07-17 9:04 UTC (permalink / raw)
To: Sobin Thomas; +Cc: igt-dev
[-- Attachment #1: Type: text/plain, Size: 969 bytes --]
== Series Details ==
Series: tests/xe_debugfs: add uc debugfs validation and read tests
URL : https://patchwork.freedesktop.org/series/170621/
State : success
== Summary ==
CI Bug Log - changes from XEIGT_9012_BAT -> XEIGTPW_15548_BAT
====================================================
Summary
-------
**SUCCESS**
No regressions found.
Participating hosts (13 -> 13)
------------------------------
No changes in participating hosts
Changes
-------
No changes found
Build changes
-------------
* IGT: IGT_9012 -> IGTPW_15548
IGTPW_15548: 2f7786286e5ff878fd032ca9e8e11be46f98c272 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
IGT_9012: d94a55886c7eec82a791728d3cc1c4a6aa945281 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
xe-5424-22852552aa1b7198931842ddf824af4dd09e2814: 22852552aa1b7198931842ddf824af4dd09e2814
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_15548/index.html
[-- Attachment #2: Type: text/html, Size: 1514 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* ✓ i915.CI.BAT: success for tests/xe_debugfs: add uc debugfs validation and read tests
2026-07-17 7:52 [PATCH i-g-t v3] tests/xe_debugfs: add uc debugfs validation and read tests Sobin Thomas
2026-07-17 9:04 ` ✓ Xe.CI.BAT: success for " Patchwork
@ 2026-07-17 9:04 ` Patchwork
1 sibling, 0 replies; 3+ messages in thread
From: Patchwork @ 2026-07-17 9:04 UTC (permalink / raw)
To: Sobin Thomas; +Cc: igt-dev
[-- Attachment #1: Type: text/plain, Size: 1099 bytes --]
== Series Details ==
Series: tests/xe_debugfs: add uc debugfs validation and read tests
URL : https://patchwork.freedesktop.org/series/170621/
State : success
== Summary ==
CI Bug Log - changes from IGT_9012 -> IGTPW_15548
====================================================
Summary
-------
**SUCCESS**
No regressions found.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_15548/index.html
Participating hosts (41 -> 39)
------------------------------
Missing (2): bat-dg2-13 bat-arls-5
Changes
-------
No changes found
Build changes
-------------
* CI: CI-20190529 -> None
* IGT: IGT_9012 -> IGTPW_15548
CI-20190529: 20190529
CI_DRM_18842: 22852552aa1b7198931842ddf824af4dd09e2814 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_15548: 2f7786286e5ff878fd032ca9e8e11be46f98c272 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
IGT_9012: d94a55886c7eec82a791728d3cc1c4a6aa945281 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_15548/index.html
[-- Attachment #2: Type: text/html, Size: 1665 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-07-17 9:05 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-17 7:52 [PATCH i-g-t v3] tests/xe_debugfs: add uc debugfs validation and read tests Sobin Thomas
2026-07-17 9:04 ` ✓ Xe.CI.BAT: success for " Patchwork
2026-07-17 9:04 ` ✓ i915.CI.BAT: " Patchwork
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox