[igt-dev] [PATCH i-g-t] tests/xe/xe_query: Add check for expected error

janga.rahul.kumar at intel.com janga.rahul.kumar at intel.com
Thu Apr 27 12:11:58 UTC 2023


From: Janga Rahul Kumar <janga.rahul.kumar at intel.com>

For negavtive subtests, check for expected error value.

Signed-off-by: Janga Rahul Kumar <janga.rahul.kumar at intel.com>
---
 tests/xe/xe_query.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/xe/xe_query.c b/tests/xe/xe_query.c
index 3f038225..ceb73c35 100644
--- a/tests/xe/xe_query.c
+++ b/tests/xe/xe_query.c
@@ -415,7 +415,7 @@ test_query_invalid_query(int fd)
 		.data = 0,
 	};
 
-	igt_assert_eq(igt_ioctl(fd, DRM_IOCTL_XE_DEVICE_QUERY, &query), -1);
+	do_ioctl_err(fd, DRM_IOCTL_XE_DEVICE_QUERY, &query, EINVAL);
 }
 
 /**
@@ -432,7 +432,7 @@ test_query_invalid_size(int fd)
 		.data = 0,
 	};
 
-	igt_assert_eq(igt_ioctl(fd, DRM_IOCTL_XE_DEVICE_QUERY, &query), -1);
+	do_ioctl_err(fd, DRM_IOCTL_XE_DEVICE_QUERY, &query, EINVAL);
 }
 
 igt_main
-- 
2.25.1



More information about the igt-dev mailing list