From: Nitin Gote <nitin.r.gote@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: michal.wajdeczko@intel.com, Nitin Gote <nitin.r.gote@intel.com>
Subject: [PATCH] tests/intel/xe_configfs: Reset configfs group after each subtest
Date: Wed, 4 Feb 2026 21:33:09 +0530 [thread overview]
Message-ID: <20260204160308.107154-2-nitin.r.gote@intel.com> (raw)
The xe_configfs test uses a shared configfs group across all subtests.
When subtests modify configfs attributes without resetting them, the
modified values persist and affect subsequent subtests. For example,
ctx-restore-mid-bb reports register value mismatches due to stale
batch buffer data from previous subtests.
Fix by removing the configfs device directory after each subtest and
letting the next subtest recreate it to get default values as
hardcoded in the driver.
Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/6204
Signed-off-by: Nitin Gote <nitin.r.gote@intel.com>
---
v1->v2:
Instead of manually resetting each attribute,
it's cleaner to remove and recreate the configfs group after
each subtests. (Michal)
tests/intel/xe_configfs.c | 47 +++++++++++++++++++++++++++++++--------
1 file changed, 38 insertions(+), 9 deletions(-)
diff --git a/tests/intel/xe_configfs.c b/tests/intel/xe_configfs.c
index d2dfd2e87..aa3435392 100644
--- a/tests/intel/xe_configfs.c
+++ b/tests/intel/xe_configfs.c
@@ -361,7 +361,6 @@ int igt_main()
configfs_fd = igt_configfs_open("xe");
igt_require(configfs_fd != -1);
- configfs_device_fd = create_device_configfs_group(configfs_fd);
igt_install_exit_handler(restore);
}
@@ -369,39 +368,69 @@ int igt_main()
igt_subtest("survivability-mode") {
igt_require(IS_BATTLEMAGE(devid));
igt_require_f(!is_vf_device, "survivability mode not supported in VF\n");
+ configfs_device_fd = create_device_configfs_group(configfs_fd);
test_survivability_mode(configfs_device_fd);
+ close(configfs_device_fd);
+ igt_fs_remove_dir(configfs_fd, bus_addr);
}
igt_describe("Validate engines_allowed with invalid options");
- igt_subtest("engines-allowed-invalid")
+ igt_subtest("engines-allowed-invalid") {
+ configfs_device_fd = create_device_configfs_group(configfs_fd);
test_engines_allowed_invalid(configfs_device_fd);
+ close(configfs_device_fd);
+ igt_fs_remove_dir(configfs_fd, bus_addr);
+ }
igt_describe("Validate engines_allowed");
- igt_subtest("engines-allowed")
+ igt_subtest("engines-allowed") {
+ configfs_device_fd = create_device_configfs_group(configfs_fd);
test_engines_allowed(configfs_device_fd);
+ close(configfs_device_fd);
+ igt_fs_remove_dir(configfs_fd, bus_addr);
+ }
igt_describe("Validate gt_types_allowed");
- igt_subtest("gt-types-allowed")
+ igt_subtest("gt-types-allowed") {
+ configfs_device_fd = create_device_configfs_group(configfs_fd);
test_gt_types_allowed(configfs_device_fd);
+ close(configfs_device_fd);
+ igt_fs_remove_dir(configfs_fd, bus_addr);
+ }
igt_describe("Validate ctx_restore_post_bb with invalid options");
- igt_subtest("ctx-restore-post-bb-invalid")
+ igt_subtest("ctx-restore-post-bb-invalid") {
+ configfs_device_fd = create_device_configfs_group(configfs_fd);
test_ctx_restore_invalid(configfs_device_fd, "post");
+ close(configfs_device_fd);
+ igt_fs_remove_dir(configfs_fd, bus_addr);
+ }
igt_describe("Validate ctx_restore_post_bb");
- igt_subtest("ctx-restore-post-bb")
+ igt_subtest("ctx-restore-post-bb") {
+ configfs_device_fd = create_device_configfs_group(configfs_fd);
test_ctx_restore(configfs_device_fd, "post");
+ close(configfs_device_fd);
+ igt_fs_remove_dir(configfs_fd, bus_addr);
+ }
igt_describe("Validate ctx_restore_mid_bb with invalid options");
- igt_subtest("ctx-restore-mid-bb-invalid")
+ igt_subtest("ctx-restore-mid-bb-invalid") {
+ configfs_device_fd = create_device_configfs_group(configfs_fd);
test_ctx_restore_invalid(configfs_device_fd, "mid");
+ close(configfs_device_fd);
+ igt_fs_remove_dir(configfs_fd, bus_addr);
+ }
igt_describe("Validate ctx_restore_mid_bb");
- igt_subtest("ctx-restore-mid-bb")
+ igt_subtest("ctx-restore-mid-bb") {
+ configfs_device_fd = create_device_configfs_group(configfs_fd);
test_ctx_restore(configfs_device_fd, "mid");
+ close(configfs_device_fd);
+ igt_fs_remove_dir(configfs_fd, bus_addr);
+ }
igt_fixture() {
- close(configfs_device_fd);
close(configfs_fd);
}
}
--
2.50.1
next reply other threads:[~2026-02-04 15:30 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-04 16:03 Nitin Gote [this message]
2026-02-04 17:51 ` ✓ Xe.CI.BAT: success for tests/intel/xe_configfs: Reset configfs group after each subtest Patchwork
2026-02-04 18:09 ` ✓ i915.CI.BAT: " Patchwork
2026-02-05 4:20 ` ✗ Xe.CI.FULL: failure " Patchwork
2026-02-09 7:15 ` Gote, Nitin R
2026-02-09 9:00 ` Ravali, JupallyX
2026-02-05 7:10 ` ✗ i915.CI.Full: " Patchwork
2026-02-09 8:11 ` ✓ i915.CI.Full: success " Patchwork
2026-02-09 11:24 ` [PATCH] " Kamil Konieczny
-- strict thread matches above, loose matches on Subject: below --
2026-02-09 13:18 Nitin Gote
2026-02-11 11:50 ` Kamil Konieczny
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=20260204160308.107154-2-nitin.r.gote@intel.com \
--to=nitin.r.gote@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=michal.wajdeczko@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