[PATCH i-g-t] tests/intel/xe_exec_queue_property: move skip into subtest

Kamil Konieczny kamil.konieczny at linux.intel.com
Thu Apr 4 15:53:20 UTC 2024


Skips in fixture are safe to use just after begin of igt_main()
when they be working for all subtests. Later on, when used in
fixture they can mislead developers reading logs, so move one
into respective subtest.

Cc: Sai Gowtham Ch <sai.gowtham.ch at intel.com>
Cc: Mauro Carvalho Chehab <mauro.chehab at linux.intel.com>
Signed-off-by: Kamil Konieczny <kamil.konieczny at linux.intel.com>
---
 tests/intel/xe_exec_queue_property.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/tests/intel/xe_exec_queue_property.c b/tests/intel/xe_exec_queue_property.c
index 57baae305..21c51bae5 100644
--- a/tests/intel/xe_exec_queue_property.c
+++ b/tests/intel/xe_exec_queue_property.c
@@ -234,13 +234,14 @@ igt_main
 	igt_subtest_group {
 		igt_fixture {
 			sys_fd = igt_sysfs_open(xe);
-			igt_require(sys_fd != -1);
-			close(sys_fd);
+			if (sys_fd != -1)
+				close(sys_fd);
 		}
 
 		for (int i = 0; i < count; i++) {
 			for (typeof(*tests) *t = tests; t->name; t++) {
 				igt_subtest_with_dynamic_f("%s-%s", property[i][0], t->name) {
+					igt_require(sys_fd != -1);
 					xe_for_each_gt(xe, gt) {
 						int engines_fd = -1;
 						int gt_fd = -1;
-- 
2.42.0



More information about the igt-dev mailing list