From: Pravalika Gurram <pravalika.gurram@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: jonathan.cavitt@intel.com, Pravalika Gurram <pravalika.gurram@intel.com>
Subject: [PATCH v2] tests/intel: Enhance the wedged_mode sysfs support
Date: Wed, 8 Jan 2025 11:58:26 +0530 [thread overview]
Message-ID: <20250108062826.908027-1-pravalika.gurram@intel.com> (raw)
1. Added support to read the wedged_mode sysfs
2. Handle the -ETIMEDOUT return value during
forcewake_all sysfs open
Signed-off-by: Pravalika Gurram <pravalika.gurram@intel.com>
Reviewed-by: Jonathan Cavitt <jonathan.cavitt@intel.com>
---
tests/intel/xe_debugfs.c | 2 +-
tests/intel/xe_wedged.c | 12 ++++++++++++
2 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/tests/intel/xe_debugfs.c b/tests/intel/xe_debugfs.c
index bcbb5036a..3a83868ba 100644
--- a/tests/intel/xe_debugfs.c
+++ b/tests/intel/xe_debugfs.c
@@ -268,7 +268,7 @@ test_forcewake(int fd)
{
int handle = igt_debugfs_open(fd, "forcewake_all", O_WRONLY);
- igt_assert_neq(handle, -1);
+ igt_assert_lte(0, handle);
close(handle);
}
diff --git a/tests/intel/xe_wedged.c b/tests/intel/xe_wedged.c
index 613d571b4..844ab2809 100644
--- a/tests/intel/xe_wedged.c
+++ b/tests/intel/xe_wedged.c
@@ -203,11 +203,16 @@ simple_hang(int fd, struct drm_xe_sync *sync)
* SUBTEST: wedged-mode-toggle
* Description: Test wedged.mode=1 after testing wedged.mode=2
*/
+/**
+ * SUBTEST: basic-wedged-read
+ * Description: Read wedged debugfs
+ */
igt_main
{
struct drm_xe_engine_class_instance *hwe;
int fd;
char pci_slot[NAME_MAX];
+ char str[150];
igt_fixture {
fd = drm_open_driver(DRIVER_XE);
@@ -279,6 +284,13 @@ igt_main
igt_assert_eq(simple_ioctl(fd), 0);
}
+ igt_subtest_f("basic-wedged-read") {
+ igt_require(igt_debugfs_exists(fd, "wedged_mode", O_RDONLY));
+
+ igt_debugfs_read(fd, "wedged_mode", str);
+ igt_assert_f(str[0] != '\0', "Failed to read wedged_mode from debugfs!\n");
+ }
+
igt_fixture {
if (igt_debugfs_exists(fd, "fail_gt_reset/probability", O_RDWR)) {
igt_debugfs_write(fd, "fail_gt_reset/probability", "0");
--
2.34.1
next reply other threads:[~2025-01-08 6:31 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-08 6:28 Pravalika Gurram [this message]
2025-01-08 7:23 ` ✗ i915.CI.BAT: failure for tests/intel: Enhance the wedged_mode sysfs support (rev2) Patchwork
2025-01-08 7:26 ` ✓ Xe.CI.BAT: success " Patchwork
2025-01-10 0:02 ` ✗ Xe.CI.Full: failure " Patchwork
2025-01-10 11:33 ` [PATCH v2] tests/intel: Enhance the wedged_mode sysfs support Kamil Konieczny
2025-01-13 13:13 ` Gurram, Pravalika
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=20250108062826.908027-1-pravalika.gurram@intel.com \
--to=pravalika.gurram@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=jonathan.cavitt@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