From: Smitha Balasubramanyam <smitha.balasubramanyam@intel.com>
To: igt-dev@lists.freedesktop.org
Subject: [PATCH v2] tests/intel/xe_configfs: ctx_restore_*_bb rollback on invalid input
Date: Wed, 27 May 2026 10:31:28 +0530 [thread overview]
Message-ID: <20260527050129.2147335-4-smitha.balasubramanyam@intel.com> (raw)
In-Reply-To: <20260527050129.2147335-1-smitha.balasubramanyam@intel.com>
Add a test vector with a partially invalid second command in the
ctx_restore_*_bb invalid-case suite to ensure a malformed multi-line
BB is rejected and the stored BB remains empty (rollback).
Replaced the hardcoded "ctx_restore_post_bb" write with the computed
file name ("ctx_restore_%s_bb") in test_ctx_restore_invalid so the
invalid-case tests work for both "post" and "mid" variants.
Changes since v1:
- Fixed alignment issue
- Updated commit message
Signed-off-by: Smitha Balasubramanyam <smitha.balasubramanyam@intel.com>
---
tests/intel/xe_configfs.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/tests/intel/xe_configfs.c b/tests/intel/xe_configfs.c
index 755524e7c..39762e030 100644
--- a/tests/intel/xe_configfs.c
+++ b/tests/intel/xe_configfs.c
@@ -225,12 +225,16 @@ static void test_ctx_restore_invalid(int configfs_device_fd, const char *type)
{ .test = "invalid-engine-instance",
.in = "rcs0 reg 4F100 DEADBEEF",
},
+ { .test = "invalid-second-command",
+ .in = "rcs cmd 11000001 4F100 DEADBEEF\n"
+ "rcs cmd 11000001 4F10G DEADBEEF",
+ },
};
char buf[4096] = { };
char file[64] = { };
snprintf(file, sizeof(file), "ctx_restore_%s_bb", type);
- igt_sysfs_set(configfs_device_fd, "ctx_restore_post_bb", "");
+ igt_sysfs_set(configfs_device_fd, file, "");
/*
* These only test if command parsing is correct,
--
2.43.0
next prev parent reply other threads:[~2026-05-27 4:57 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-20 4:57 [PATCH 0/2] Negative tests for VM_BIND decompression Smitha Balasubramanyam
2026-04-20 4:57 ` [PATCH 1/2] tests/intel : Add data structs & helper utilities for VM_Bind Neg tests Smitha Balasubramanyam
2026-04-20 10:41 ` Karthik B S
2026-04-20 4:57 ` [PATCH 2/2] tests/intel : Add Neg tests for VM_Bind Decomp Smitha Balasubramanyam
2026-04-21 14:22 ` ✓ i915.CI.BAT: success for Negative tests for VM_BIND decompression Patchwork
2026-04-21 14:33 ` ✓ Xe.CI.BAT: " Patchwork
2026-04-21 16:52 ` ✗ Xe.CI.FULL: failure " Patchwork
2026-04-21 18:31 ` ✗ i915.CI.Full: " Patchwork
2026-05-25 11:40 ` [PATCH v2 0/3] " Smitha Balasubramanyam
2026-05-25 11:40 ` [PATCH v2 1/3] tests/intel/xe_ccs : Add helpers and Negative test for VM_Bind Decomp Smitha Balasubramanyam
2026-05-25 11:40 ` [PATCH v2 2/3] tests/intel/xe_ccs: Add fault-mode helper and VM_BIND decomp neg test Smitha Balasubramanyam
2026-05-25 11:40 ` [PATCH v2 3/3] tests/intel/xe_ccs : Add CCS corruption neg test for VM_BIND decomp Smitha Balasubramanyam
2026-05-25 12:15 ` [PATCH v2 0/3] Negative tests for VM_BIND decompression Smitha Balasubramanyam
2026-05-25 12:15 ` [PATCH v2 1/3] tests/intel/xe_ccs : Add helpers and Negative test for VM_Bind Decomp Smitha Balasubramanyam
2026-05-25 12:15 ` [PATCH v2 2/3] tests/intel/xe_ccs: Add fault-mode helper and VM_BIND decomp neg test Smitha Balasubramanyam
2026-05-25 12:15 ` [PATCH v2 3/3] tests/intel/xe_ccs : Add CCS corruption neg test for VM_BIND decomp Smitha Balasubramanyam
2026-05-25 20:05 ` ✗ Fi.CI.BUILD: failure for Negative tests for VM_BIND decompression Patchwork
2026-05-26 14:36 ` [PATCH v3 0/3] " Smitha Balasubramanyam
2026-05-26 14:36 ` [PATCH v3 1/3] tests/intel/xe_ccs : Add helpers and Negative test for VM_Bind Decomp Smitha Balasubramanyam
2026-05-26 14:36 ` [PATCH v3 2/3] tests/intel/xe_ccs: Add fault-mode helper and VM_BIND decomp neg test Smitha Balasubramanyam
2026-05-26 14:36 ` [PATCH v3 3/3] tests/intel/xe_ccs : Add CCS corruption neg test for VM_BIND decomp Smitha Balasubramanyam
2026-05-27 5:01 ` [PATCH] tests/intel: ctx_restore rollback on invalid input Smitha Balasubramanyam
2026-05-27 5:01 ` [PATCH] tests/intel/xe_configfs: Add malformed multi-line BB to verify ctx rejection and rollback Smitha Balasubramanyam
2026-05-27 5:01 ` [PATCH] tests\intel\xe_configfs: Fix ctx_restore BB path for post and mid variants Smitha Balasubramanyam
2026-05-27 5:01 ` Smitha Balasubramanyam [this message]
2026-05-27 5:01 ` [PATCH v2] tests/intel/xe_configfs: " Smitha Balasubramanyam
2026-05-27 5:37 ` ✗ Fi.CI.BUILD: failure for tests/intel: ctx_restore rollback on invalid input (rev3) Patchwork
-- strict thread matches above, loose matches on Subject: below --
2026-04-20 6:38 [PATCH] tests/intel: ctx_restore rollback on invalid input Smitha Balasubramanyam
2026-04-22 9:15 ` [PATCH v2] tests/intel/xe_configfs: ctx_restore_*_bb " Smitha Balasubramanyam
2026-04-22 14:54 ` 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=20260527050129.2147335-4-smitha.balasubramanyam@intel.com \
--to=smitha.balasubramanyam@intel.com \
--cc=igt-dev@lists.freedesktop.org \
/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