From: nishit.sharma@intel.com
To: igt-dev@lists.freedesktop.org, kamil.konieczny@intel.com
Subject: [PATCH] tests/intel/xe_sysfs_scheduler: fix save/restore array indexing
Date: Tue, 1 Sep 2026 03:59:02 +0000 [thread overview]
Message-ID: <20260901035902.222919-1-nishit.sharma@intel.com> (raw)
From: Nishit Sharma <nishit.sharma@intel.com>
The scheduler property save/restore array was declared as
store[MAX_GTS][3][3] but indexed with the per-GT engine index in the
first (GT) dimension:
This drops the GT dimension completely: on multi-GT systems every GT
overwrites the same slots, so teardown restores each engine's
preempt_timeout/timeslice_duration/job_timeout with values from the
last GT that was saved, tripping the "not restored!" abort. It also
overflows the array whenever a GT exposes more than MAX_GTS engines.
Signed-off-by: Nishit Sharma <nishit.sharma@intel.com>
---
tests/intel/xe_sysfs_scheduler.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/tests/intel/xe_sysfs_scheduler.c b/tests/intel/xe_sysfs_scheduler.c
index 383625064..cbf25762a 100644
--- a/tests/intel/xe_sysfs_scheduler.c
+++ b/tests/intel/xe_sysfs_scheduler.c
@@ -237,7 +237,7 @@ int igt_main()
{"job_timeout_ms", "job_timeout_min", "job_timeout_max"},
};
- unsigned int store[MAX_GTS][3][3];
+ unsigned int store[MAX_GTS][XE_MAX_ENGINE_INSTANCE][3][3];
int count = sizeof(property) / sizeof(property[0]);
int gt_count = 0;
int xe = -1;
@@ -271,7 +271,7 @@ int igt_main()
const char **pl = property[j];
for (int k = 0; k < 3; k++) {
- unsigned int *loc = &store[i][j][k];
+ unsigned int *loc = &store[gt_count][i][j][k];
igt_require(igt_sysfs_scanf(list[i], pl[k],
"%u", loc) == 1);
@@ -314,7 +314,7 @@ int igt_main()
for (int k = 2; k >= 0; k--) {
unsigned int read = UINT_MAX;
- unsigned int val = store[i][j][k];
+ unsigned int val = store[gtn][i][j][k];
igt_sysfs_printf(e, pl[k], "%u", val);
igt_sysfs_scanf(e, pl[k], "%u", &read);
--
2.43.0
next reply other threads:[~2026-09-01 3:59 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-01 3:59 nishit.sharma [this message]
2026-09-01 14:33 ` [PATCH] tests/intel/xe_sysfs_scheduler: fix save/restore array indexing Kamil Konieczny
2026-09-01 22:33 ` ✓ i915.CI.BAT: success for " Patchwork
2026-09-02 12:53 ` ✓ Xe.CI.FULL: " Patchwork
2026-09-02 13:21 ` ✗ i915.CI.Full: failure " Patchwork
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=20260901035902.222919-1-nishit.sharma@intel.com \
--to=nishit.sharma@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=kamil.konieczny@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